diff --git a/common/cogl-current-matrix.c b/common/cogl-current-matrix.c index 7563c8cec..1ccb4c6dd 100644 --- a/common/cogl-current-matrix.c +++ b/common/cogl-current-matrix.c @@ -33,6 +33,19 @@ #include "cogl-current-matrix.h" #include "cogl-matrix-stack.h" +#ifdef HAVE_COGL_GLES2 +#include "cogl-gles2-wrapper.h" + +#define glFrustum(L,R,B,T,N,F) \ + cogl_wrap_glFrustumf((GLfloat)L, (GLfloat)R, (GLfloat)B, \ + (GLfloat)T, (GLfloat)N, (GLfloat)F) +#elif defined (HAVE_COGL_GLES) + +#define glFrustum(L,R,B,T,N,F) \ + glFrustumf((GLfloat)L, (GLfloat)R, (GLfloat)B, \ + (GLfloat)T, (GLfloat)N, (GLfloat)F) +#endif + #include #include diff --git a/gles/cogl-gles2-wrapper.c b/gles/cogl-gles2-wrapper.c index 7f4ebbe92..54a1d8c55 100644 --- a/gles/cogl-gles2-wrapper.c +++ b/gles/cogl-gles2-wrapper.c @@ -1505,6 +1505,8 @@ cogl_wrap_glGetIntegerv (GLenum pname, GLint *params) void cogl_wrap_glGetFloatv (GLenum pname, GLfloat *params) { + CoglGles2WrapperTextureUnit *texture_unit; + _COGL_GET_GLES2_WRAPPER (w, NO_RETVAL); switch (pname) @@ -1519,6 +1521,14 @@ cogl_wrap_glGetFloatv (GLenum pname, GLfloat *params) sizeof (GLfloat) * 16); break; + case GL_TEXTURE_MATRIX: + texture_unit = w->texture_units + w->active_texture_unit; + memcpy (params, + texture_unit->texture_stack + + texture_unit->texture_stack_pos * 16, + sizeof (GLfloat) * 16); + break; + case GL_VIEWPORT: glGetFloatv (GL_VIEWPORT, params); break; diff --git a/gles/cogl-gles2-wrapper.h b/gles/cogl-gles2-wrapper.h index ec6860b03..4d4fd1a43 100644 --- a/gles/cogl-gles2-wrapper.h +++ b/gles/cogl-gles2-wrapper.h @@ -255,6 +255,7 @@ struct _CoglGles2WrapperShader #define GL_MODELVIEW_MATRIX 0x0BA6 #define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_TEXTURE_MATRIX 0x0BA8 #define GL_GENERATE_MIPMAP 0x8191