summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZan Dobersek <zdobersek@igalia.com>2015-05-08 01:50:25 -0700
committerBryce Harrington <bryce@osg.samsung.com>2015-05-18 15:03:29 -0700
commitf52f0e2feb1ad0a4de23c475a8c020d41a1764a8 (patch)
treee9a9248e3c82c849e86abc2973c7671655d094cb
parent8b798c320f6fd2d87349d0a716304474022bc5ea (diff)
Manually transpose the matrix in _cairo_gl_shader_bind_matrix()
To maintain compatibility with OpenGL ES 2.0, the matrix in _cairo_gl_shader_bind_matrix() should be manually transposed, and GL_FALSE passed as the transpose argument to the glUniformMatrix3fv() call as it is the only valid value for that parameter in OpenGL ES 2.0. Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Acked-by: "Henry (Yu) Song" <henry.song@samsung.com>
-rw-r--r--src/cairo-gl-shaders.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c
index 271060666..fe975d2d7 100644
--- a/src/cairo-gl-shaders.c
+++ b/src/cairo-gl-shaders.c
@@ -973,12 +973,12 @@ _cairo_gl_shader_bind_matrix (cairo_gl_context_t *ctx,
{
cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
float gl_m[9] = {
- m->xx, m->xy, m->x0,
- m->yx, m->yy, m->y0,
- 0, 0, 1
+ m->xx, m->yx, 0,
+ m->xy, m->yy, 0,
+ m->x0, m->y0, 1
};
assert (location != -1);
- dispatch->UniformMatrix3fv (location, 1, GL_TRUE, gl_m);
+ dispatch->UniformMatrix3fv (location, 1, GL_FALSE, gl_m);
}
void