From 05e9c078a26a03ecb71d852d35589579189fae94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 29 Nov 2010 20:21:50 +0000 Subject: [PATCH] Handle VBO draw elements . --- glapi.py | 4 ++-- glretrace.py | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/glapi.py b/glapi.py index 669ec16..caf1ff4 100644 --- a/glapi.py +++ b/glapi.py @@ -400,7 +400,7 @@ glapi.add_functions([ # GL_VERSION_1_1 GlFunction(Void, "glDrawArrays", [(GLenum_mode, "mode"), (GLint, "first"), (GLsizei, "count")]), - GlFunction(Void, "glDrawElements", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (Blob(Const(GLvoid), "__glCallLists_size(count, type)"), "indices")]), + GlFunction(Void, "glDrawElements", [(GLenum_mode, "mode"), (GLsizei, "count"), (GLenum, "type"), (Const(OpaquePointer(GLvoid)), "indices")]), GlFunction(Void, "glGetPointerv", [(GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False), GlFunction(Void, "glPolygonOffset", [(GLfloat, "factor"), (GLfloat, "units")]), GlFunction(Void, "glCopyTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLenum, "internalformat"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLint, "border")]), @@ -435,7 +435,7 @@ glapi.add_functions([ # GL_VERSION_1_2 GlFunction(Void, "glBlendColor", [(GLclampf, "red"), (GLclampf, "green"), (GLclampf, "blue"), (GLclampf, "alpha")]), GlFunction(Void, "glBlendEquation", [(GLenum, "mode")]), - GlFunction(Void, "glDrawRangeElements", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (Blob(Const(GLvoid), "__glCallLists_size(count, type)"), "indices")]), + GlFunction(Void, "glDrawRangeElements", [(GLenum_mode, "mode"), (GLuint, "start"), (GLuint, "end"), (GLsizei, "count"), (GLenum, "type"), (Const(OpaquePointer(GLvoid)), "indices")]), GlFunction(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexImage3D_size(format, type, width, height, depth, border)"), "pixels")]), GlFunction(Void, "glTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexSubImage3D_size(format, type, width, height, depth)"), "pixels")]), GlFunction(Void, "glCopyTexSubImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "xoffset"), (GLint, "yoffset"), (GLint, "zoffset"), (GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]), diff --git a/glretrace.py b/glretrace.py index 15b2c2d..fde4f0f 100644 --- a/glretrace.py +++ b/glretrace.py @@ -67,14 +67,26 @@ class GlRetracer(Retracer): def extract_arg(self, function, arg, arg_type, lvalue, rvalue): if function.name in [ "glColorPointer", + "glColorPointerEXT", "glEdgeFlagPointer", + "glEdgeFlagPointerEXT", + "glFogCoordPointer", + "glFogCoordPointerEXT", "glIndexPointer", + "glIndexPointerEXT", + "glMatrixIndexPointerARB", "glNormalPointer", - "glTexCoordPointer", - "glVertexPointer", - "glFogCoordPointer", + "glNormalPointerEXT", "glSecondaryColorPointer", + "glSecondaryColorPointerEXT", + "glTexCoordPointer", + "glTexCoordPointerEXT", + "glVertexAttribLPointer", "glVertexAttribPointer", + "glVertexAttribPointerARB", + "glVertexAttribPointerNV", + "glVertexPointer", + "glVertexPointerEXT", ] and arg.name == 'pointer': self.extract_pointer(function, arg, arg_type, lvalue, rvalue) else: -- 2.43.0