diff options
| author | 2014-03-20 01:04:57 +0000 | |
|---|---|---|
| committer | 2014-03-20 01:04:57 +0000 | |
| commit | 89513ee544cd6373496179758e09954af0ba217d (patch) | |
| tree | 7034992ce2b7dd07f6a11134d7e3d1681fce77d1 /libs/hwui/Program.cpp | |
| parent | 2598fbd71a2109ab307d32935a13fa1eab150e8d (diff) | |
| parent | 5d39a77992ba6573fbc0cd4d85e0390bb5feb637 (diff) | |
Merge "Fix projection offset caching - DO NOT MERGE" into klp-dev
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); |