mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 11:30:45 -05:00
gles2: Implement a wrapper for glGetIntegerv(GL_MAX_TEXTURE_UNITS)
The GLES2 backend for Cogl is failing to compile because GL_MAX_TEXTURE_UNITS is not defined. Let's define it and provide a wrapper which uses GL_MAX_TEXTURE_IMAGE_UNITS or COGL_GLES2_MAX_TEXTURE_UNITS, whichever is the smallest.
This commit is contained in:
parent
984c19a6f7
commit
7dce5d9372
@ -1285,6 +1285,12 @@ cogl_wrap_glGetIntegerv (GLenum pname, GLint *params)
|
|||||||
*params = w->matrix_mode;
|
*params = w->matrix_mode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GL_MAX_TEXTURE_UNITS:
|
||||||
|
glGetIntegerv (GL_MAX_TEXTURE_IMAGE_UNITS, params);
|
||||||
|
if (*params > COGL_GLES2_MAX_TEXTURE_UNITS)
|
||||||
|
*params = COGL_GLES2_MAX_TEXTURE_UNITS;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
glGetIntegerv (pname, params);
|
glGetIntegerv (pname, params);
|
||||||
break;
|
break;
|
||||||
|
@ -301,6 +301,8 @@ struct _CoglGles2WrapperShader
|
|||||||
#define GL_EMISSION 0x1600
|
#define GL_EMISSION 0x1600
|
||||||
#define GL_SHININESS 0x1601
|
#define GL_SHININESS 0x1601
|
||||||
|
|
||||||
|
#define GL_MAX_TEXTURE_UNITS 0x84e2
|
||||||
|
|
||||||
#endif /* GL_MODELVIEW */
|
#endif /* GL_MODELVIEW */
|
||||||
|
|
||||||
void cogl_gles2_wrapper_init (CoglGles2Wrapper *wrapper);
|
void cogl_gles2_wrapper_init (CoglGles2Wrapper *wrapper);
|
||||||
|
Loading…
Reference in New Issue
Block a user