diff options
| author | 2014-01-29 21:20:36 +0000 | |
|---|---|---|
| committer | 2014-01-29 21:20:36 +0000 | |
| commit | 967c7fb2af23cbdadba45f9113cbcaa9f55c3f24 (patch) | |
| tree | fb91245fce5f195c2813a164e24d4165a10d5d8d /libs/hwui/Program.cpp | |
| parent | 2f03f90d859ee57525178750b19444591174e3a5 (diff) | |
| parent | d04a6b15f74035fd2068f34225825b55e94521f4 (diff) | |
Merge "Fix projection offset caching"
Diffstat (limited to 'libs/hwui/Program.cpp')
| -rw-r--r-- | libs/hwui/Program.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index a679552aa757..ee7789755609 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -163,7 +163,7 @@ GLuint Program::buildShader(const char* source, GLenum type) { void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix, const mat4& transformMatrix, bool offset) { - if (projectionMatrix != mProjection) { + if (projectionMatrix != mProjection || offset != mOffset) { if (CC_LIKELY(!offset)) { glUniformMatrix4fv(projection, 1, GL_FALSE, &projectionMatrix.data[0]); } else { @@ -177,6 +177,7 @@ void Program::set(const mat4& projectionMatrix, const mat4& modelViewMatrix, glUniformMatrix4fv(projection, 1, GL_FALSE, &p.data[0]); } mProjection = projectionMatrix; + mOffset = offset; } mat4 t(transformMatrix); |