mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 16:40:41 -05:00
bef099ce40
The wrapper for glClearColor was taking fixed arguments but was given floating point values so it ended up always setting the clear color to black. Now that GLES 1.1 is using the floating point version, there is no need for the wrapper so both versions now just use glClearColor directly. A similar problem was happening for glColor but this does still need a wrapper because it needs to set the vertex attribute.
91 lines
2.3 KiB
Diff
91 lines
2.3 KiB
Diff
diff --git a/clutter/cogl/gles/cogl-gles2-wrapper.c b/clutter/cogl/gles/cogl-gles2-wrapper.c
|
|
index b2e19eb..a7800c5 100644
|
|
--- a/clutter/cogl/gles/cogl-gles2-wrapper.c
|
|
+++ b/clutter/cogl/gles/cogl-gles2-wrapper.c
|
|
@@ -515,15 +515,6 @@ cogl_gles2_wrapper_update_matrix (CoglGles2Wrapper *wrapper, GLenum matrix_num)
|
|
}
|
|
|
|
void
|
|
-cogl_wrap_glClearColorx (GLclampx r, GLclampx g, GLclampx b, GLclampx a)
|
|
-{
|
|
- glClearColor ( (r),
|
|
- (g),
|
|
- (b),
|
|
- (a));
|
|
-}
|
|
-
|
|
-void
|
|
cogl_wrap_glPushMatrix ()
|
|
{
|
|
const float *src;
|
|
@@ -1143,13 +1134,9 @@ cogl_wrap_glAlphaFunc (GLenum func, GLclampf ref)
|
|
}
|
|
|
|
void
|
|
-cogl_wrap_glColor4x (GLclampx r, GLclampx g, GLclampx b, GLclampx a)
|
|
+cogl_wrap_glColor4f (GLclampf r, GLclampf g, GLclampf b, GLclampf a)
|
|
{
|
|
- glVertexAttrib4f (COGL_GLES2_WRAPPER_COLOR_ATTRIB,
|
|
- (r),
|
|
- (g),
|
|
- (b),
|
|
- (a));
|
|
+ glVertexAttrib4f (COGL_GLES2_WRAPPER_COLOR_ATTRIB, r, g, b, a);
|
|
}
|
|
|
|
void
|
|
@@ -1158,15 +1145,6 @@ cogl_wrap_glClipPlanex (GLenum plane, GLfloat *equation)
|
|
/* FIXME */
|
|
}
|
|
|
|
-static void
|
|
-cogl_gles2_float_array_to_fixed (int size,
|
|
- const GLfloat *floats,
|
|
- GLfloat *fixeds)
|
|
-{
|
|
- while (size-- > 0)
|
|
- *(fixeds++) = (*(floats++));
|
|
-}
|
|
-
|
|
void
|
|
cogl_wrap_glGetIntegerv (GLenum pname, GLint *params)
|
|
{
|
|
@@ -1185,31 +1163,24 @@ cogl_wrap_glGetIntegerv (GLenum pname, GLint *params)
|
|
}
|
|
|
|
void
|
|
-cogl_wrap_glGetFixedv (GLenum pname, GLfloat *params)
|
|
+cogl_wrap_glGetFloatv (GLenum pname, GLfloat *params)
|
|
{
|
|
_COGL_GET_GLES2_WRAPPER (w, NO_RETVAL);
|
|
|
|
switch (pname)
|
|
{
|
|
case GL_MODELVIEW_MATRIX:
|
|
- cogl_gles2_float_array_to_fixed (16, w->modelview_stack
|
|
- + w->modelview_stack_pos * 16,
|
|
- params);
|
|
+ memcpy (params, w->modelview_stack + w->modelview_stack_pos * 16,
|
|
+ sizeof (GLfloat) * 16);
|
|
break;
|
|
|
|
case GL_PROJECTION_MATRIX:
|
|
- cogl_gles2_float_array_to_fixed (16, w->projection_stack
|
|
- + w->projection_stack_pos * 16,
|
|
- params);
|
|
+ memcpy (params, w->projection_stack + w->projection_stack_pos * 16,
|
|
+ sizeof (GLfloat) * 16);
|
|
break;
|
|
|
|
case GL_VIEWPORT:
|
|
- {
|
|
- GLfloat v[4];
|
|
-
|
|
- glGetFloatv (GL_VIEWPORT, v);
|
|
- cogl_gles2_float_array_to_fixed (4, v, params);
|
|
- }
|
|
+ glGetFloatv (GL_VIEWPORT, params);
|
|
break;
|
|
}
|
|
}
|