From 4d8d5072764adbd977a5a0ba923e394b14c5991b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Mon, 27 Aug 2012 03:02:43 +0000 Subject: [PATCH] [GB.OPENGL] * BUG: Add synonymous starting with an underscore for constants beginning with a digit. [GB.OPENGL.GLSL] * BUG: Remove the "GL_" prefix in all constants. git-svn-id: svn://localhost/gambas/trunk@5084 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.opengl/src/GL.c | 5 +++++ gb.opengl/src/glsl/GL.c | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/gb.opengl/src/GL.c b/gb.opengl/src/GL.c index 7d12f70e5..602243e3f 100644 --- a/gb.opengl/src/GL.c +++ b/gb.opengl/src/GL.c @@ -522,6 +522,11 @@ GB_DESC Cgl[] = GB_CONSTANT("3D_COLOR", "i", GL_3D_COLOR), GB_CONSTANT("3D_COLOR_TEXTURE", "i", GL_3D_COLOR_TEXTURE), GB_CONSTANT("4D_COLOR_TEXTURE", "i", GL_4D_COLOR_TEXTURE), + GB_CONSTANT("_2D", "i", GL_2D), + GB_CONSTANT("_3D", "i", GL_3D), + GB_CONSTANT("_3D_COLOR", "i", GL_3D_COLOR), + GB_CONSTANT("_3D_COLOR_TEXTURE", "i", GL_3D_COLOR_TEXTURE), + GB_CONSTANT("_4D_COLOR_TEXTURE", "i", GL_4D_COLOR_TEXTURE), GB_CONSTANT("POINT_TOKEN", "i", GL_POINT_TOKEN), GB_CONSTANT("LINE_TOKEN", "i", GL_LINE_TOKEN), GB_CONSTANT("LINE_RESET_TOKEN", "i", GL_LINE_RESET_TOKEN), diff --git a/gb.opengl/src/glsl/GL.c b/gb.opengl/src/glsl/GL.c index e205c61b4..b664a2a36 100644 --- a/gb.opengl/src/glsl/GL.c +++ b/gb.opengl/src/glsl/GL.c @@ -94,21 +94,21 @@ GB_DESC Cgl[] = GB_STATIC_METHOD("VertexAttrib4fv", NULL, GLVERTEXATTRIB4FV, "(Index)i(V)Float[]"), /* Contants */ - GB_CONSTANT("GL_ACTIVE_ATTRIBUTES", "i", GL_ACTIVE_ATTRIBUTES), - GB_CONSTANT("GL_ACTIVE_ATTRIBUTE_MAX_LENGTH", "i", GL_ACTIVE_ATTRIBUTE_MAX_LENGTH), - GB_CONSTANT("GL_ACTIVE_UNIFORMS", "i", GL_ACTIVE_UNIFORMS), - GB_CONSTANT("GL_ACTIVE_UNIFORM_MAX_LENGTH", "i", GL_ACTIVE_UNIFORM_MAX_LENGTH), - GB_CONSTANT("GL_ATTACHED_SHADERS", "i", GL_ATTACHED_SHADERS), - GB_CONSTANT("GL_COMPILE_STATUS", "i", GL_COMPILE_STATUS), - GB_CONSTANT("GL_CURRENT_PROGRAM", "i", GL_CURRENT_PROGRAM), - GB_CONSTANT("GL_DELETE_STATUS", "i", GL_DELETE_STATUS), - GB_CONSTANT("GL_FRAGMENT_SHADER", "i", GL_FRAGMENT_SHADER), - GB_CONSTANT("GL_INFO_LOG_LENGTH", "i", GL_INFO_LOG_LENGTH), - GB_CONSTANT("GL_LINK_STATUS", "i", GL_LINK_STATUS), - GB_CONSTANT("GL_SHADER_SOURCE_LENGTH", "i", GL_SHADER_SOURCE_LENGTH), - GB_CONSTANT("GL_SHADER_TYPE", "i", GL_SHADER_TYPE), - GB_CONSTANT("GL_VALIDATE_STATUS", "i", GL_VALIDATE_STATUS), - GB_CONSTANT("GL_VERTEX_SHADER", "i", GL_VERTEX_SHADER), + GB_CONSTANT("ACTIVE_ATTRIBUTES", "i", GL_ACTIVE_ATTRIBUTES), + GB_CONSTANT("ACTIVE_ATTRIBUTE_MAX_LENGTH", "i", GL_ACTIVE_ATTRIBUTE_MAX_LENGTH), + GB_CONSTANT("ACTIVE_UNIFORMS", "i", GL_ACTIVE_UNIFORMS), + GB_CONSTANT("ACTIVE_UNIFORM_MAX_LENGTH", "i", GL_ACTIVE_UNIFORM_MAX_LENGTH), + GB_CONSTANT("ATTACHED_SHADERS", "i", GL_ATTACHED_SHADERS), + GB_CONSTANT("COMPILE_STATUS", "i", GL_COMPILE_STATUS), + GB_CONSTANT("CURRENT_PROGRAM", "i", GL_CURRENT_PROGRAM), + GB_CONSTANT("DELETE_STATUS", "i", GL_DELETE_STATUS), + GB_CONSTANT("FRAGMENT_SHADER", "i", GL_FRAGMENT_SHADER), + GB_CONSTANT("INFO_LOG_LENGTH", "i", GL_INFO_LOG_LENGTH), + GB_CONSTANT("LINK_STATUS", "i", GL_LINK_STATUS), + GB_CONSTANT("SHADER_SOURCE_LENGTH", "i", GL_SHADER_SOURCE_LENGTH), + GB_CONSTANT("SHADER_TYPE", "i", GL_SHADER_TYPE), + GB_CONSTANT("VALIDATE_STATUS", "i", GL_VALIDATE_STATUS), + GB_CONSTANT("VERTEX_SHADER", "i", GL_VERTEX_SHADER), GB_END_DECLARE };