From eb60c09bf9f9b5482defeeee1356cfbcef8c763f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Mon, 16 May 2011 09:53:59 +0100 Subject: [PATCH] Recognize more parameters. --- glapi.py | 28 ++++++++++++++-------------- glparams.py | 36 ++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/glapi.py b/glapi.py index addada7..cb1035a 100644 --- a/glapi.py +++ b/glapi.py @@ -551,7 +551,7 @@ glapi.add_functions([ GlFunction(Void, "glGetBufferSubData", [(GLenum, "target"), (GLintptr, "offset"), (GLsizeiptr, "size"), Out(Blob(GLvoid, "size"), "data")], sideeffects=False), GlFunction(GLmap, "glMapBuffer", [(GLenum, "target"), (GLenum, "access")]), GlFunction(GLboolean, "glUnmapBuffer", [(GLenum, "target")]), - GlFunction(Void, "glGetBufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")], sideeffects=False), + GlFunction(Void, "glGetBufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glGetBufferPointerv", [(GLenum, "target"), (GLenum, "pname"), (Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False), # GL_VERSION_2_0 @@ -574,17 +574,17 @@ glapi.add_functions([ GlFunction(Void, "glGetActiveUniform", [(GLprogram, "program"), (GLuint, "index"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(Pointer(GLint), "size"), Out(Pointer(GLenum), "type"), Out(GLstring, "name")], sideeffects=False), GlFunction(Void, "glGetAttachedShaders", [(GLprogram, "program"), (GLsizei, "maxCount"), Out(Pointer(GLsizei), "count"), Out(Array(GLuint, "(count ? *count : maxCount)"), "obj")], sideeffects=False), GlFunction(GLint, "glGetAttribLocation", [(GLprogram, "program"), (Const(GLstring), "name")], sideeffects=False), - GlFunction(Void, "glGetProgramiv", [(GLprogram, "program"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False), + GlFunction(Void, "glGetProgramiv", [(GLprogram, "program"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glGetProgramInfoLog", [(GLprogram, "program"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(GLstring, "infoLog")], sideeffects=False), - GlFunction(Void, "glGetShaderiv", [(GLshader, "shader"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False), + GlFunction(Void, "glGetShaderiv", [(GLshader, "shader"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glGetShaderInfoLog", [(GLshader, "shader"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(GLstring, "infoLog")], sideeffects=False), GlFunction(Void, "glGetShaderSource", [(GLshader, "shader"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(String("GLchar *", "*length"), "source")], sideeffects=False), GlFunction(GLlocation, "glGetUniformLocation", [(GLprogram, "program"), (Const(GLstring), "name")]), GlFunction(Void, "glGetUniformfv", [(GLprogram, "program"), (GLlocation, "location"), Out(OpaquePointer(GLfloat), "params")], sideeffects=False), GlFunction(Void, "glGetUniformiv", [(GLprogram, "program"), (GLlocation, "location"), Out(OpaquePointer(GLint), "params")], sideeffects=False), - GlFunction(Void, "glGetVertexAttribdv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "4"), "params")], sideeffects=False), - GlFunction(Void, "glGetVertexAttribfv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "4"), "params")], sideeffects=False), - GlFunction(Void, "glGetVertexAttribiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "4"), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribdv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribfv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glGetVertexAttribPointerv", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "pointer")], sideeffects=False), GlFunction(GLboolean, "glIsProgram", [(GLprogram, "program")], sideeffects=False), GlFunction(GLboolean, "glIsShader", [(GLshader, "shader")], sideeffects=False), @@ -674,8 +674,8 @@ glapi.add_functions([ GlFunction(Void, "glBeginConditionalRender", [(GLuint, "id"), (GLenum, "mode")]), GlFunction(Void, "glEndConditionalRender", []), GlFunction(Void, "glVertexAttribIPointer", [(GLuint, "index"), (GLint, "size"), (GLenum, "type"), (GLsizei, "stride"), (Const(OpaquePointer(GLvoid)), "pointer")]), - GlFunction(Void, "glGetVertexAttribIiv", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False), - GlFunction(Void, "glGetVertexAttribIuiv", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(GLuint), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribIiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribIuiv", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLuint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glVertexAttribI1i", [(GLuint, "index"), (GLint, "x")]), GlFunction(Void, "glVertexAttribI2i", [(GLuint, "index"), (GLint, "x"), (GLint, "y")]), GlFunction(Void, "glVertexAttribI3i", [(GLuint, "index"), (GLint, "x"), (GLint, "y"), (GLint, "z")]), @@ -889,11 +889,11 @@ glapi.add_functions([ GlFunction(Void, "glGetProgramEnvParameterfvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, "4"), "params")], sideeffects=False), GlFunction(Void, "glGetProgramLocalParameterdvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLdouble, "4"), "params")], sideeffects=False), GlFunction(Void, "glGetProgramLocalParameterfvARB", [(GLenum, "target"), (GLuint, "index"), Out(Array(GLfloat, "4"), "params")], sideeffects=False), - GlFunction(Void, "glGetProgramivARB", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False), + GlFunction(Void, "glGetProgramivARB", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glGetProgramStringARB", [(GLenum, "target"), (GLenum, "pname"), Out(OpaquePointer(GLvoid), "string")], sideeffects=False), - GlFunction(Void, "glGetVertexAttribdvARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "4"), "params")], sideeffects=False), - GlFunction(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "4"), "params")], sideeffects=False), - GlFunction(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "4"), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribdvARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLdouble, "__gl_param_size(pname)"), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLfloat, "__gl_param_size(pname)"), "params")], sideeffects=False), + GlFunction(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glGetVertexAttribPointervARB", [(GLuint, "index"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "pointer")], sideeffects=False), GlFunction(GLboolean, "glIsProgramARB", [(GLprogramARB, "program")], sideeffects=False), @@ -907,7 +907,7 @@ glapi.add_functions([ GlFunction(Void, "glGetBufferSubDataARB", [(GLenum, "target"), (GLintptrARB, "offset"), (GLsizeiptrARB, "size"), Out(Blob(GLvoid, "size"), "data")], sideeffects=False), GlFunction(GLmap, "glMapBufferARB", [(GLenum, "target"), (GLenum, "access")]), GlFunction(GLboolean, "glUnmapBufferARB", [(GLenum, "target")]), - GlFunction(Void, "glGetBufferParameterivARB", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(GLint), "params")], sideeffects=False), + GlFunction(Void, "glGetBufferParameterivARB", [(GLenum, "target"), (GLenum, "pname"), Out(Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(Void, "glGetBufferPointervARB", [(GLenum, "target"), (GLenum, "pname"), Out(Pointer(OpaquePointer(GLvoid)), "params")], sideeffects=False), # GL_ARB_occlusion_query @@ -982,7 +982,7 @@ glapi.add_functions([ GlFunction(Void, "glDeleteRenderbuffers", [(GLsizei, "n"), (Const(Array(GLrenderbuffer, "n")), "renderbuffers")]), GlFunction(Void, "glGenRenderbuffers", [(GLsizei, "n"), Out(Array(GLrenderbuffer, "n"), "renderbuffers")]), GlFunction(Void, "glRenderbufferStorage", [(GLenum, "target"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]), - GlFunction(Void, "glGetRenderbufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (OpaquePointer(GLint), "params")], sideeffects=False), + GlFunction(Void, "glGetRenderbufferParameteriv", [(GLenum, "target"), (GLenum, "pname"), (Array(GLint, "__gl_param_size(pname)"), "params")], sideeffects=False), GlFunction(GLboolean, "glIsFramebuffer", [(GLframebuffer, "framebuffer")], sideeffects=False), GlFunction(Void, "glBindFramebuffer", [(GLenum, "target"), (GLframebuffer, "framebuffer")]), GlFunction(Void, "glDeleteFramebuffers", [(GLsizei, "n"), (Const(Array(GLframebuffer, "n")), "framebuffers")]), diff --git a/glparams.py b/glparams.py index bc55dab..8d07208 100644 --- a/glparams.py +++ b/glparams.py @@ -1613,8 +1613,8 @@ parameters = [ ("", X, 1, "GL_DYNAMIC_ATI"), # 0x8761 ("", X, 1, "GL_PRESERVE_ATI"), # 0x8762 ("", X, 1, "GL_DISCARD_ATI"), # 0x8763 - ("", X, 1, "GL_BUFFER_SIZE"), # 0x8764 - ("", X, 1, "GL_BUFFER_USAGE"), # 0x8765 + ("glGetBufferParameter", I, 1, "GL_BUFFER_SIZE"), # 0x8764 + ("glGetBufferParameter", E, 1, "GL_BUFFER_USAGE"), # 0x8765 ("", X, 1, "GL_ARRAY_OBJECT_BUFFER_ATI"), # 0x8766 ("", X, 1, "GL_ARRAY_OBJECT_OFFSET_ATI"), # 0x8767 ("", X, 1, "GL_ELEMENT_ARRAY_ATI"), # 0x8768 @@ -1931,9 +1931,9 @@ parameters = [ ("", X, 1, "GL_READ_ONLY"), # 0x88B8 ("", X, 1, "GL_WRITE_ONLY"), # 0x88B9 ("", X, 1, "GL_READ_WRITE"), # 0x88BA - ("", X, 1, "GL_BUFFER_ACCESS"), # 0x88BB - ("", X, 1, "GL_BUFFER_MAPPED"), # 0x88BC - ("", X, 1, "GL_BUFFER_MAP_POINTER"), # 0x88BD + ("glGetBufferParameter", E, 1, "GL_BUFFER_ACCESS"), # 0x88BB + ("glGetBufferParameter", B, 1, "GL_BUFFER_MAPPED"), # 0x88BC + ("glGetBufferParameter", P, 1, "GL_BUFFER_MAP_POINTER"), # 0x88BD ("", X, 1, "GL_WRITE_DISCARD_NV"), # 0x88BE ("", X, 1, "GL_TIME_ELAPSED"), # 0x88BF ("", X, 1, "GL_MATRIX0_ARB"), # 0x88C0 @@ -2332,7 +2332,7 @@ parameters = [ ("", X, 1, "GL_READ_FRAMEBUFFER"), # 0x8CA8 ("", X, 1, "GL_DRAW_FRAMEBUFFER"), # 0x8CA9 ("glGet", I, 1, "GL_READ_FRAMEBUFFER_BINDING"), # 0x8CAA - ("", X, 1, "GL_RENDERBUFFER_SAMPLES"), # 0x8CAB + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_SAMPLES"), # 0x8CAB ("", X, 1, "GL_DEPTH_COMPONENT32F"), # 0x8CAC ("", X, 1, "GL_DEPTH32F_STENCIL8"), # 0x8CAD ("glGetFramebufferAttachmentParameter", E, 1, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"), # 0x8CD0 @@ -2369,19 +2369,19 @@ parameters = [ ("", X, 1, "GL_STENCIL_ATTACHMENT"), # 0x8D20 ("", X, 1, "GL_FRAMEBUFFER"), # 0x8D40 ("", X, 1, "GL_RENDERBUFFER"), # 0x8D41 - ("", X, 1, "GL_RENDERBUFFER_WIDTH"), # 0x8D42 - ("", X, 1, "GL_RENDERBUFFER_HEIGHT"), # 0x8D43 - ("", X, 1, "GL_RENDERBUFFER_INTERNAL_FORMAT"), # 0x8D44 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_WIDTH"), # 0x8D42 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_HEIGHT"), # 0x8D43 + ("glGetRenderbufferParameter", E, 1, "GL_RENDERBUFFER_INTERNAL_FORMAT"), # 0x8D44 ("", X, 1, "GL_STENCIL_INDEX1"), # 0x8D46 ("", X, 1, "GL_STENCIL_INDEX4"), # 0x8D47 ("", X, 1, "GL_STENCIL_INDEX8"), # 0x8D48 ("", X, 1, "GL_STENCIL_INDEX16"), # 0x8D49 - ("", X, 1, "GL_RENDERBUFFER_RED_SIZE"), # 0x8D50 - ("", X, 1, "GL_RENDERBUFFER_GREEN_SIZE"), # 0x8D51 - ("", X, 1, "GL_RENDERBUFFER_BLUE_SIZE"), # 0x8D52 - ("", X, 1, "GL_RENDERBUFFER_ALPHA_SIZE"), # 0x8D53 - ("", X, 1, "GL_RENDERBUFFER_DEPTH_SIZE"), # 0x8D54 - ("", X, 1, "GL_RENDERBUFFER_STENCIL_SIZE"), # 0x8D55 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_RED_SIZE"), # 0x8D50 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_GREEN_SIZE"), # 0x8D51 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_BLUE_SIZE"), # 0x8D52 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_ALPHA_SIZE"), # 0x8D53 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_DEPTH_SIZE"), # 0x8D54 + ("glGetRenderbufferParameter", I, 1, "GL_RENDERBUFFER_STENCIL_SIZE"), # 0x8D55 ("", X, 1, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"), # 0x8D56 ("glGet", I, 1, "GL_MAX_SAMPLES"), # 0x8D57 ("", X, 1, "GL_RGBA32UI"), # 0x8D70 @@ -2812,9 +2812,9 @@ parameters = [ ("", X, 1, "GL_TIMEOUT_EXPIRED"), # 0x911B ("", X, 1, "GL_CONDITION_SATISFIED"), # 0x911C ("", X, 1, "GL_WAIT_FAILED"), # 0x911D - ("", X, 1, "GL_BUFFER_ACCESS_FLAGS"), # 0x911F - ("", X, 1, "GL_BUFFER_MAP_LENGTH"), # 0x9120 - ("", X, 1, "GL_BUFFER_MAP_OFFSET"), # 0x9121 + ("glGetBufferParameter", I, 1, "GL_BUFFER_ACCESS_FLAGS"), # 0x911F + ("glGetBufferParameter", I, 1, "GL_BUFFER_MAP_LENGTH"), # 0x9120 + ("glGetBufferParameter", I, 1, "GL_BUFFER_MAP_OFFSET"), # 0x9121 ("", X, 1, "GL_MAX_VERTEX_OUTPUT_COMPONENTS"), # 0x9122 ("", X, 1, "GL_MAX_GEOMETRY_INPUT_COMPONENTS"), # 0x9123 ("", X, 1, "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS"), # 0x9124 -- 2.45.2