2007-07-12 Matthew Allum <mallum@openedhand.com>

* clutter/clutter-actor.c: (clutter_actor_paint):
        * clutter/clutter-stage.c: (clutter_stage_get_actor_at_pos):
        * clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl.c: (cogl_get_viewport):
        * clutter/cogl/gles/cogl.c: (cogl_get_viewport):
        Based on patch from Pan Bohui, See;
        http://bugzilla.openedhand.com/show_bug.cgi?id=390

        * TODO:
        More misc updates.
This commit is contained in:
Matthew Allum 2007-07-12 10:15:19 +00:00
parent 8c5ac95a69
commit e0487843f3
3 changed files with 29 additions and 0 deletions

3
cogl.h
View File

@ -198,6 +198,9 @@ cogl_get_projection_matrix (ClutterFixed m[16]);
void
cogl_get_viewport (ClutterFixed v[4]);
void
cogl_get_bitmasks (gint *red, gint *green, gint *blue, gint *alpha);
G_END_DECLS
#endif /* __COGL_H__ */

View File

@ -636,3 +636,16 @@ cogl_get_viewport (ClutterFixed v[4])
v[2] = CLUTTER_FLOAT_TO_FIXED (vd[2]);
v[3] = CLUTTER_FLOAT_TO_FIXED (vd[3]);
}
void
cogl_get_bitmasks (gint *red, gint *green, gint *blue, gint *alpha)
{
if (red)
GE( glGetIntegerv(GL_RED_BITS, red) );
if (green)
GE( glGetIntegerv(GL_GREEN_BITS, green) );
if (blue)
GE( glGetIntegerv(GL_BLUE_BITS, blue) );
if (alpha)
GE( glGetIntegerv(GL_ALPHA_BITS, alpha ) );
}

View File

@ -566,3 +566,16 @@ cogl_get_viewport (ClutterFixed v[4])
{
glGetFixedv(GL_VIEWPORT, &v[0]);
}
void
cogl_get_bitmasks (gint *red, gint *green, gint *blue, gint *alpha)
{
if (red)
GE( glGetInteger(GL_RED_BITS, red) );
if (green)
GE( glGetInteger(GL_GREEN_BITS, green) );
if (blue)
GE( glGetInteger(GL_BLUE_BITS, blue) );
if (alpha)
GE( glGetInteger(GL_ALPHA_BITS, alpha ) );
}