summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-09 15:41:25 -0700
committerBrian <[email protected]>2007-03-09 15:41:25 -0700
commitb9ea9361500979b318574ac69ce656ea3af6a197 (patch)
tree4e07dceeb3f2aa0600c2a1b2bc9e8184bdf60c2b /src/mesa/main/get.c
parent2cf5fd48d1586f961910a14324a457854cb66221 (diff)
added GL_CURRENT_PROGRAM
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 4cd07cb7b11..d09e0610ab0 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1888,6 +1888,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
break;
+ case GL_CURRENT_PROGRAM:
+ CHECK_EXT1(ARB_shader_objects, "GetBooleanv");
+ params[0] = INT_TO_BOOLEAN(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
}
@@ -3715,6 +3719,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
break;
+ case GL_CURRENT_PROGRAM:
+ CHECK_EXT1(ARB_shader_objects, "GetFloatv");
+ params[0] = (GLfloat)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
}
@@ -5542,6 +5550,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
break;
+ case GL_CURRENT_PROGRAM:
+ CHECK_EXT1(ARB_shader_objects, "GetIntegerv");
+ params[0] = ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
}