}
+/** glGetHandleARB() - return ID/name of currently bound shader program */
static GLuint
_mesa_get_handle(GLcontext *ctx, GLenum pname)
{
- GLint handle = 0;
-
if (pname == GL_PROGRAM_OBJECT_ARB) {
- CALL_GetIntegerv(ctx->Exec, (GL_CURRENT_PROGRAM, &handle));
- } else {
+ if (ctx->Shader.CurrentProgram)
+ return ctx->Shader.CurrentProgram->Name;
+ else
+ return 0;
+ }
+ else {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetHandleARB");
+ return 0;
}
-
- return handle;
}
+/**
+ * glGetProgramiv() - get shader program state.
+ * Note that this is for GLSL shader programs, not ARB vertex/fragment
+ * programs (see glGetProgramivARB).
+ */
static void
_mesa_get_programiv(GLcontext *ctx, GLuint program,
GLenum pname, GLint *params)
}
+/** glGetShaderiv() - get GLSL shader state */
static void
_mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
{