GLES1: glLoadIdentity / glLoadMatrix(f|x)
BUG=angleproject:2306
Change-Id: I46fe961e6eb87b2f41c39afe1e943d9146a0abfa
Reviewed-on: https://chromium-review.googlesource.com/1002913
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index b0b24ec..aea253a 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -1289,9 +1289,18 @@
case GL_PATH_MODELVIEW_MATRIX_CHROMIUM:
case GL_PATH_PROJECTION_MATRIX_CHROMIUM:
{
- ASSERT(mExtensions.pathRendering);
- const GLfloat *m = mGLState.getPathRenderingMatrix(pname);
- memcpy(params, m, 16 * sizeof(GLfloat));
+ // GLES1 emulation: // GL_PATH_(MODELVIEW|PROJECTION)_MATRIX_CHROMIUM collides with the
+ // GLES1 constants for modelview/projection matrix.
+ if (getClientVersion() < Version(2, 0))
+ {
+ mGLState.getFloatv(pname, params);
+ }
+ else
+ {
+ ASSERT(mExtensions.pathRendering);
+ const GLfloat *m = mGLState.getPathRenderingMatrix(pname);
+ memcpy(params, m, 16 * sizeof(GLfloat));
+ }
}
break;
@@ -7027,6 +7036,12 @@
*type = GL_FLOAT;
*numParams = 3;
return true;
+ case GL_MODELVIEW_MATRIX:
+ case GL_PROJECTION_MATRIX:
+ case GL_TEXTURE_MATRIX:
+ *type = GL_FLOAT;
+ *numParams = 16;
+ return true;
}
}