diff options
| author | 2014-03-20 16:05:02 +0000 | |
|---|---|---|
| committer | 2014-03-20 16:05:02 +0000 | |
| commit | db2895e97745c68924b831701a2bf76e13a5025a (patch) | |
| tree | 3665526fc7a7dc72aa6f529d2f330c85725c8863 /libs/hwui/Program.cpp | |
| parent | 1d6c2573d4b2824511354d651d7350df327f454f (diff) | |
| parent | 4eefde23de23a5e9145a634e843964f6f6eaa6bd (diff) | |
am 4eefde23: am 29f00c9f: am 7c9bd98a: am 89513ee5: Merge "Fix projection offset caching - DO NOT MERGE" into klp-dev
* commit '4eefde23de23a5e9145a634e843964f6f6eaa6bd':
Fix projection offset caching - DO NOT MERGE
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 7814a01ad929..58f5325476eb 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); |