Acme-MITHALDU-BleedingOpenGL
view release on metacpan or search on metacpan
pogl_gl_Prog_Clam.xs view on Meta::CPAN
PUSHs(sv_2mortal(newSViv(((GLbyte*)pointer)[i])));
}
break;
case GL_UNSIGNED_SHORT:
for (i=0;i<count;i++)
{
PUSHs(sv_2mortal(newSViv(((GLushort*)pointer)[i])));
}
break;
case GL_SHORT:
for (i=0;i<count;i++)
{
PUSHs(sv_2mortal(newSViv(((GLushort*)pointer)[i])));
}
break;
case GL_UNSIGNED_INT:
for (i=0;i<count;i++)
{
PUSHs(sv_2mortal(newSViv(((GLuint*)pointer)[i])));
}
break;
case GL_INT:
for (i=0;i<count;i++)
{
PUSHs(sv_2mortal(newSViv(((GLint*)pointer)[i])));
}
break;
case GL_FLOAT:
for (i=0;i<count;i++)
{
PUSHs(sv_2mortal(newSVnv(((GLfloat*)pointer)[i])));
}
break;
case GL_DOUBLE:
for (i=0;i<count;i++)
{
PUSHs(sv_2mortal(newSVnv(((GLdouble*)pointer)[i])));
}
break;
default:
croak("unknown type");
}
}
#endif
#ifdef GL_ARB_vertex_shader
#//# glBindAttribLocationARB($programObj, $index, $name);
void
glBindAttribLocationARB(programObj, index, name)
GLhandleARB programObj
GLuint index
void *name
INIT:
loadProc(glBindAttribLocationARB,"glBindAttribLocationARB");
CODE:
glBindAttribLocationARB(programObj,index,name);
#//# glGetActiveAttribARB_c($programObj, $index, $maxLength, (CPTR)length, (CPTR)size, (CPTR)type, (CPTR)name);
void
glGetActiveAttribARB_c(programObj, index, maxLength, length, size, type, name)
GLhandleARB programObj
GLuint index
GLsizei maxLength
void *length
void *size
void *type
void *name
INIT:
loadProc(glGetActiveAttribARB,"glGetActiveAttribARB");
CODE:
glGetActiveAttribARB(programObj,index,maxLength,length,size,type,name);
#//# glGetActiveAttribARB_s($programObj, $index, $maxLength, (PACKED)length, (PACKED)size, (PACKED)type, (PACKED)name);
void
glGetActiveAttribARB_s(programObj, index, maxLength, length, size, type, name)
GLhandleARB programObj
GLuint index
GLsizei maxLength
SV *length
SV *size
SV *type
SV *name
INIT:
loadProc(glGetActiveAttribARB,"glGetActiveAttribARB");
CODE:
{
GLsizei *length_s = EL(length, sizeof(GLsizei));
GLint *size_s = EL(size, sizeof(GLint));
GLenum *type_s = EL(type, sizeof(GLenum));
GLcharARB *name_s = EL(name, sizeof(GLcharARB));
glGetActiveAttribARB(programObj,index,maxLength,length_s,size_s,type_s,name_s);
}
#//# ($name,$type,$size) = glGetActiveAttribARB_p($programObj, $index);
void
glGetActiveAttribARB_p(programObj, index)
GLhandleARB programObj
GLuint index
INIT:
loadProc(glGetObjectParameterivARB,"glGetObjectParameterivARB");
loadProc(glGetActiveAttribARB,"glGetActiveAttribARB");
PPCODE:
{
GLsizei maxLength;
glGetObjectParameterivARB(programObj,GL_OBJECT_ACTIVE_ATTRIBUTES_ARB,
(GLvoid *)&maxLength);
if (maxLength)
{
GLsizei length;
GLint size;
GLenum type;
GLcharARB *name;
name = malloc(maxLength+1);
glGetActiveAttribARB(programObj,index,maxLength,
&length,&size,&type,name);
name[length] = 0;
if (*name)
{
EXTEND(sp,3);
PUSHs(sv_2mortal(newSVpv(name,0)));
PUSHs(sv_2mortal(newSViv(type)));
PUSHs(sv_2mortal(newSViv(size)));
}
else
{
EXTEND(sp,1);
PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
}
free(name);
}
else
{
EXTEND(sp,1);
PUSHs(sv_2mortal(newSVsv(&PL_sv_undef)));
}
}
#//# glGetAttribLocationARB_c($programObj, (CPTR)name);
GLint
glGetAttribLocationARB_c(programObj, name)
GLhandleARB programObj
void *name
INIT:
loadProc(glGetAttribLocationARB,"glGetAttribLocationARB");
CODE:
RETVAL = glGetAttribLocationARB(programObj, name);
OUTPUT:
RETVAL
#//!!! Since pointer is string, should combine _C and _p
#//# $value = glGetAttribLocationARB_p(programObj, $name);
GLint
glGetAttribLocationARB_p(programObj, ...)
GLhandleARB programObj
INIT:
loadProc(glGetAttribLocationARB,"glGetAttribLocationARB");
CODE:
{
GLcharARB *name = (GLcharARB *)SvPV(ST(1),PL_na);
RETVAL = glGetAttribLocationARB(programObj, name);
}
OUTPUT:
RETVAL
#endif
#ifdef GL_ARB_point_parameters
#//# glPointParameterfARB($pname,$param);
void
glPointParameterfARB(pname,param)
GLenum pname
GLfloat param
( run in 1.946 second using v1.01-cache-2.11-cpan-5735350b133 )