diff --git a/cogl/driver/gles/cogl-gles2-wrapper.c b/cogl/driver/gles/cogl-gles2-wrapper.c index f3a9e83b1..256e50532 100644 --- a/cogl/driver/gles/cogl-gles2-wrapper.c +++ b/cogl/driver/gles/cogl-gles2-wrapper.c @@ -1285,6 +1285,12 @@ cogl_wrap_glGetIntegerv (GLenum pname, GLint *params) *params = w->matrix_mode; 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: glGetIntegerv (pname, params); break; diff --git a/cogl/driver/gles/cogl-gles2-wrapper.h b/cogl/driver/gles/cogl-gles2-wrapper.h index 33287e01d..021841597 100644 --- a/cogl/driver/gles/cogl-gles2-wrapper.h +++ b/cogl/driver/gles/cogl-gles2-wrapper.h @@ -301,6 +301,8 @@ struct _CoglGles2WrapperShader #define GL_EMISSION 0x1600 #define GL_SHININESS 0x1601 +#define GL_MAX_TEXTURE_UNITS 0x84e2 + #endif /* GL_MODELVIEW */ void cogl_gles2_wrapper_init (CoglGles2Wrapper *wrapper);