mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 23:28:06 +02:00
mesa: Deal with size differences between GLuint and GLhandleARB in GetAttachedObjectsARB
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Nicolai Hähnle <nhaehnle@gmail.com>
This commit is contained in:
parent
b20d6bf96d
commit
739ac3d39d
1 changed files with 17 additions and 1 deletions
|
|
@ -1374,10 +1374,26 @@ _mesa_DetachShader(GLuint program, GLuint shader)
|
|||
|
||||
void GLAPIENTRY
|
||||
_mesa_GetAttachedObjectsARB(GLhandleARB container, GLsizei maxCount,
|
||||
GLsizei * count, GLhandleARB * obj)
|
||||
GLsizei * count, GLhandleARB * objARB)
|
||||
{
|
||||
int i;
|
||||
GLuint *obj;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
obj = calloc(maxCount, sizeof(GLuint));
|
||||
if (!obj) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetAttachedObjectsARB");
|
||||
return;
|
||||
}
|
||||
|
||||
get_attached_shaders(ctx, container, maxCount, count, obj);
|
||||
|
||||
for (i = 0 ; i < *count; i++) {
|
||||
objARB[i] = (GLhandleARB)obj[i];
|
||||
}
|
||||
|
||||
free(obj);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue