/**
* Return list of shaders attached to shader program.
+ * \param objOut returns GLuint ids
+ * \param handleOut returns GLhandleARB handles
*/
static void
get_attached_shaders(struct gl_context *ctx, GLuint program, GLsizei maxCount,
- GLsizei *count, GLuint *obj)
+ GLsizei *countOut, GLuint *objOut, GLhandleARB *handleOut)
{
struct gl_shader_program *shProg;
if (shProg) {
GLuint i;
for (i = 0; i < (GLuint) maxCount && i < shProg->NumShaders; i++) {
- obj[i] = shProg->Shaders[i]->Name;
+ if (objOut) {
+ objOut[i] = shProg->Shaders[i]->Name;
+ }
+
+ if (handleOut) {
+ handleOut[i] = (GLhandleARB) shProg->Shaders[i]->Name;
+ }
+ }
+ if (countOut) {
+ *countOut = i;
}
- if (count)
- *count = i;
}
}
-
/**
* glGetHandleARB() - return ID/name of currently bound shader program.
*/
GLsizei * count, GLhandleARB * obj)
{
GET_CURRENT_CONTEXT(ctx);
- get_attached_shaders(ctx, container, maxCount, count, obj);
+ get_attached_shaders(ctx, (GLuint)container, maxCount, count, NULL, obj);
}
GLsizei *count, GLuint *obj)
{
GET_CURRENT_CONTEXT(ctx);
- get_attached_shaders(ctx, program, maxCount, count, obj);
+ get_attached_shaders(ctx, program, maxCount, count, obj, NULL);
}