Acme-MITHALDU-BleedingOpenGL
view release on metacpan or search on metacpan
pogl_gl_Tex2_Draw.xs view on Meta::CPAN
void
glPolygonOffsetEXT(factor, bias)
GLfloat factor
GLfloat units
#endif
#ifdef GL_EXT_texture_object
#// glIsTextureEXT($list);
GLboolean
glIsTextureEXT(list)
GLuint list
#// glPrioritizeTexturesEXT_p(@textureIDs,@priorities);
void
glPrioritizeTexturesEXT_p(...)
CODE:
{
GLsizei n = items/2;
GLuint * textures = malloc(sizeof(GLuint) * (n+1));
GLclampf * prior = malloc(sizeof(GLclampf) * (n+1));
int i;
for (i=0;i<n;i++) {
textures[i] = SvIV(ST(i * 2 + 0));
prior[i] = SvNV(ST(i * 2 + 1));
}
glPrioritizeTextures(n, textures, prior);
free(textures);
free(prior);
}
#// glBindTextureEXT($target, $texture);
void
glBindTextureEXT(target, texture)
GLenum target
GLuint texture
#// glDeleteTexturesEXT_p(@textureIDs);
void
glDeleteTexturesEXT_p(...);
CODE:
if (items) {
GLuint * list = malloc(sizeof(GLuint) * items);
int i;
for(i=0;i<items;i++)
list[i] = SvIV(ST(i));
glDeleteTextures(items, list);
free(list);
}
#// @textureIDs = glGenTexturesEXT_p($n);
void
glGenTexturesEXT_p(n)
GLint n
PPCODE:
if (n) {
GLuint * textures = malloc(sizeof(GLuint) * n);
int i;
glGenTextures(n, textures);
EXTEND(sp, n);
for(i=0;i<n;i++)
PUSHs(sv_2mortal(newSViv(textures[i])));
free(textures);
}
#// ($result,@residences) = glAreTexturesResidentEXT_p(@textureIDs);
void
glAreTexturesResidentEXT_p(...)
PPCODE:
{
GLsizei n = items;
GLuint * textures = malloc(sizeof(GLuint) * (n+1));
GLboolean * residences = malloc(sizeof(GLboolean) * (n+1));
GLboolean result;
int i;
for (i=0;i<n;i++)
textures[i] = SvIV(ST(i));
result = glAreTexturesResident(n, textures, residences);
if (result == GL_TRUE)
PUSHs(sv_2mortal(newSViv(1)));
else {
EXTEND(sp, n+1);
PUSHs(sv_2mortal(newSViv(0)));
for(i=0;i<n;i++)
PUSHs(sv_2mortal(newSViv(residences[i])));
}
free(textures);
free(residences);
}
#endif
#ifdef GL_EXT_copy_texture
#// glCopyTexImage1DEXT($target, $level, $internalFormat, $x, $y, $width, $border);
void
glCopyTexImage1DEXT(target, level, internalFormat, x, y, width, border)
GLenum target
GLint level
GLenum internalFormat
GLint x
GLint y
GLsizei width
GLint border
#// glCopyTexImage2DEXT($target, $level, $internalFormat, $x, $y, $width, $height, $border);
void
glCopyTexImage2DEXT(target, level, internalFormat, x, y, width, height, border)
GLenum target
GLint level
GLenum internalFormat
GLint x
GLint y
GLsizei width
GLsizei height
GLint border
#// glCopyTexSubImage1DEXT($target, $level, $xoffset, $x, $y, $width);
void
glCopyTexSubImage1DEXT(target, level, xoffset, x, y, width)
GLenum target
GLint level
GLint xoffset
GLint x
GLint y
( run in 1.102 second using v1.01-cache-2.11-cpan-71847e10f99 )