1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
/*
# BUILD api_versions [0x11b]
*/
%module texture_object
#define __version__ "$Revision: 1.7 $"
#define __date__ "$Date: 2001/10/17 15:32:20 $"
#define __api_version__ API_VERSION
#define __author__ "Tarn Weisner Burton <twburton@users.sourceforge.net>"
#define __doc__ "http:\057\057oss.sgi.com/projects/ogl-sample/registry/EXT/texture_object.txt"
%{
/**
*
* GL.EXT.texture_object Module for PyOpenGL
*
* Date: May 2001
*
* Authors: Tarn Weisner Burton <twburton@users.sourceforge.net>
*
***/
%}
%include util.inc
/* turn the exception handler on */
GL_EXCEPTION_HANDLER()
%{
#if !EXT_DEFINES_PROTO || !defined(GL_EXT_texture_object)
DECLARE_EXT(glAreTexturesResidentEXT, GLboolean, 0, (GLsizei n, const GLuint* textures, GLboolean* residences), (n, textures, residences))
DECLARE_VOID_EXT(glBindTextureEXT, (GLenum target, GLuint texture), (target, texture))
DECLARE_VOID_EXT(glDeleteTexturesEXT, (GLsizei n, const GLuint* textures), (n, textures))
DECLARE_VOID_EXT(glGenTexturesEXT, (GLsizei n, GLuint* textures), (n, textures))
DECLARE_EXT(glIsTextureEXT, GLboolean, 0, (GLuint texture), (texture))
DECLARE_VOID_EXT(glPrioritizeTexturesEXT, (GLsizei n, const GLuint* textures, const GLclampf* priorities), (n, textures, priorities))
#endif
%}
/*GLboolean glAreTexturesResidentEXT(GLsizei n_1, const GLuint *textures, GLboolean * residences); */
%{
PyObject* _glAreTexturesResidentEXT(GLsizei n, const GLuint *textures)
{
GLboolean *residences = PyMem_New(GLboolean, n);
PyObject *result;
glAreTexturesResidentEXT(n, textures, residences);
result = _PyTuple_FromUnsignedCharArray(n, residences);
PyMem_Del(residences);
return result;
}
%}
%name(glAreTexturesResidentEXT) PyObject* _glAreTexturesResidentEXT(GLsizei n_1, const GLuint *textures);
DOC(glAreTexturesResidentEXT, "glAreTexturesResidentEXT(textures[]) -> residences")
void glBindTextureEXT(GLenum target, GLuint texture);
DOC(glBindTextureEXT, "glBindTextureEXT(target, texture) -> None")
void glDeleteTexturesEXT(GLsizei n_1, const GLuint *textures);
DOC(glDeleteTexturesEXT, "glDeleteTexturesEXT(textures[]) -> None")
/*void glGenTexturesEXT (GLsizei n, GLuint *textures); */
%{
PyObject* _glGenTexturesEXT (GLsizei n)
{
GLuint* textures;
PyObject* result;
textures = PyMem_New(GLuint, n);
glGenTexturesEXT(n, textures);
result = _PyTuple_FromUnsignedIntArray(n, textures);
PyMem_Del(textures);
return result;
}
%}
%name(glGenTexturesEXT) PyObject* _glGenTexturesEXT (GLsizei n);
DOC(glGenTexturesEXT, "glGenTexturesEXT(n) -> textures")
GLboolean glIsTextureEXT (GLuint texture);
DOC(glIsTextureEXT, "glIsTextureEXT(texture) -> boolean")
void glPrioritizeTexturesEXT (GLsizei n_1, const GLuint *textures, const GLclampf *priorities);
DOC(glPrioritizeTexturesEXT, "glPrioritizeTexturesEXT(textures[], priorities[]) -> None")
%{
static char *proc_names[] =
{
#if !EXT_DEFINES_PROTO || !defined(GL_EXT_texture_object)
"glAreTexturesResidentEXT",
"glBindTextureEXT",
"glDeleteTexturesEXT",
"glGenTexturesEXT",
"glIsTextureEXT",
"glPrioritizeTexturesEXT",
#endif
NULL
};
#define glInitTextureObjectEXT() InitExtension("GL_EXT_texture_object", proc_names)
%}
int glInitTextureObjectEXT();
DOC(glInitTextureObjectEXT, "glInitTextureObjectEXT() -> bool")
%name(glInitTexObjectEXT) int glInitTextureObjectEXT();
DOC(glInitTexObjectEXT, "glInitTexObjectEXT() -> bool")
%{
PyObject *__info()
{
if (glInitTextureObjectEXT())
{
PyObject *info = PyList_New(0);
return info;
}
Py_INCREF(Py_None);
return Py_None;
}
%}
PyObject *__info();
#define GL_TEXTURE_PRIORITY_EXT 0x8066
#define GL_TEXTURE_RESIDENT_EXT 0x8067
#define GL_TEXTURE_1D_BINDING_EXT 0x8068
#define GL_TEXTURE_2D_BINDING_EXT 0x8069
#define GL_TEXTURE_3D_BINDING_EXT 0x806A
|