diff --git a/ChangeLog b/ChangeLog index c514e4196..8f7d1ca3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-18 Neil Roberts + + Bug 1044 - cogl_get_viewport error + + * clutter/cogl/gles/cogl.c (cogl_get_viewport): Use glGetIntegerv + instead of glGetFixedv to read the viewport because the latter + converts incorrectly on some hardware. + 2008-09-18 Neil Roberts Bug 1080 - clutter_stage_read_pixels has upside-down y coordinate diff --git a/clutter/cogl/gles/cogl.c b/clutter/cogl/gles/cogl.c index 95ca10eef..7259680af 100644 --- a/clutter/cogl/gles/cogl.c +++ b/clutter/cogl/gles/cogl.c @@ -862,7 +862,13 @@ cogl_get_projection_matrix (ClutterFixed m[16]) void cogl_get_viewport (ClutterFixed v[4]) { - cogl_wrap_glGetFixedv(GL_VIEWPORT, &v[0]); + GLint viewport[4]; + int i; + + cogl_wrap_glGetIntegerv (GL_VIEWPORT, viewport); + + for (i = 0; i < 4; i++) + v[i] = CLUTTER_INT_TO_FIXED (viewport[i]); } void