OpenGL-Simple

 view release on metacpan or  search on metacpan

Simple.xs  view on Meta::CPAN

                }

                /* plane and equation[] are defined. */

                glClipPlane(plane,equation);

void glGetClipPlane(...)
    PREINIT:
        GLdouble equation[4];
        int i;
    PPCODE:
        if (1==items) {
            /* Dump everything on the stack */

            glGetClipPlane(SvIV(ST(0)),equation);
            EXTEND(sp,4);
            for (i=0;i<4;i++) {
                PUSHs(sv_2mortal(newSVnv(equation[i])));
            }
        } else if (2==items) {
            /* Write through supplied array reference */

Simple.xs  view on Meta::CPAN


void glGet(...)
	PREINIT:
		toygl_rtype rtype;
		GLenum pname;
		/* Dunno if this should really be allocated on the stack. */
		GLdouble	doublearr[16];
		GLint   	intarr[4];
		GLboolean	boolarr[4];
		int nvals; /* No of values returned by glGet() */
	PPCODE:
		if ( (1!=items) && (2!=items) ) {
			croak("glGet() requires 1 or 2 arguments");
		}

		if ( (2==items) && (!SvROK(ST(1))) ) {
			croak("Second argument to glGet() must be reference");
		}

		pname = SvIV(ST(0));

Simple.xs  view on Meta::CPAN

		glDeleteTextures(n,textures);
		free(textures);


void glGenTextures(...)
	PREINIT:
		GLuint *texture=NULL;
		int n;
		AV *array;
		SV **svpp;
	PPCODE:
		if ( (1!=items) && (2!=items) ) {
			croak("Bad number of arguments");
		}

		n = SvUV(ST(0));

		if (2==items) {
			int i;
			if (	   (!SvROK(ST(1)))
				|| (SVt_PVAV != SvTYPE(SvRV(ST(1))))



( run in 0.417 second using v1.01-cache-2.11-cpan-5511b514fd6 )