mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2008-02-01 Matthew Allum <mallum@openedhand.com>
* clutter/cogl/cogl.h: * clutter/cogl/gl/cogl.c: * clutter/cogl/gles/cogl.c: Disable the depth test and buffer as has some strange side effects, mainly on x/y axis rotation with multiple layers at same depth (eg rotating text on a bg has very strange effect). Seems no clean 100% effective way to fix without other odd issues.. So for now move to application to handle and add cogl_enable_depth_test() as for custom actors (i.e groups) to enable if need be.
This commit is contained in:
parent
b14da429e0
commit
d83442476f
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
||||
2008-02-01 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* clutter/cogl/cogl.h:
|
||||
* clutter/cogl/gl/cogl.c: (cogl_paint_init), (cogl_enable):
|
||||
* clutter/cogl/gles/cogl.c: (cogl_enable):
|
||||
|
||||
Disable the depth test and buffer as has some strange side
|
||||
effects, mainly on x/y axis rotation with multiple layers at
|
||||
same depth (eg rotating text on a bg has very strange
|
||||
effect). Seems no clean 100% effective way to fix without other
|
||||
odd issues.. So for now move to application to handle and add
|
||||
cogl_enable_depth_test() as for custom actors (i.e groups) to
|
||||
enable if need be.
|
||||
|
||||
|
||||
2008-02-01 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* clutter/clutter-texture.c: (clutter_texture_new_from_actor):
|
||||
|
@ -118,6 +118,9 @@ cogl_clip_unset (void);
|
||||
void
|
||||
cogl_enable (gulong flags);
|
||||
|
||||
void
|
||||
cogl_enable_depth_test (gboolean setting);
|
||||
|
||||
gboolean
|
||||
cogl_texture_can_size (COGLenum target,
|
||||
COGLenum pixel_format,
|
||||
|
@ -200,8 +200,19 @@ cogl_paint_init (const ClutterColor *color)
|
||||
glDisable (GL_LIGHTING);
|
||||
glDisable (GL_FOG);
|
||||
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
/*
|
||||
* Disable the depth test for now as has some strange side effects,
|
||||
* mainly on x/y axis rotation with multiple layers at same depth
|
||||
* (eg rotating text on a bg has very strange effect). Seems no clean
|
||||
* 100% effective way to fix without other odd issues.. So for now
|
||||
* move to application to handle and add cogl_enable_depth_test()
|
||||
* as for custom actors (i.e groups) to enable if need be.
|
||||
*
|
||||
* glEnable (GL_DEPTH_TEST);
|
||||
* glEnable (GL_ALPHA_TEST)
|
||||
* glDepthFunc (GL_LEQUAL);
|
||||
* glAlphaFunc (GL_GREATER, 0.1);
|
||||
*/
|
||||
|
||||
cogl_enable (CGL_ENABLE_BLEND);
|
||||
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
@ -308,22 +319,23 @@ cogl_enable (gulong flags)
|
||||
__enable_flags &= ~CGL_ENABLE_TEXTURE_RECT;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (flags & CGL_ENABLE_ALPHA_TEST)
|
||||
void
|
||||
cogl_enable_depth_test (gboolean setting)
|
||||
{
|
||||
if (setting)
|
||||
{
|
||||
if (!(__enable_flags & CGL_ENABLE_ALPHA_TEST))
|
||||
{
|
||||
glEnable (GL_ALPHA_TEST);
|
||||
__enable_flags |= CGL_ENABLE_ALPHA_TEST;
|
||||
}
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
glEnable (GL_ALPHA_TEST);
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
glAlphaFunc (GL_GREATER, 0.1);
|
||||
}
|
||||
else if (__enable_flags & CGL_ENABLE_ALPHA_TEST)
|
||||
else
|
||||
{
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
glDisable (GL_ALPHA_TEST);
|
||||
__enable_flags &= ~CGL_ENABLE_ALPHA_TEST;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -224,18 +224,22 @@ cogl_enable (gulong flags)
|
||||
__enable_flags &= ~CGL_ENABLE_TEXTURE_RECT;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (flags & CGL_ENABLE_ALPHA_TEST)
|
||||
void
|
||||
cogl_enable_depth_test (gboolean setting)
|
||||
{
|
||||
if (setting)
|
||||
{
|
||||
if (!(__enable_flags & CGL_ENABLE_ALPHA_TEST))
|
||||
glEnable (GL_ALPHA_TEST);
|
||||
|
||||
__enable_flags |= CGL_ENABLE_ALPHA_TEST;
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
glEnable (GL_ALPHA_TEST);
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
glAlphaFunc (GL_GREATER, 0.1);
|
||||
}
|
||||
else if (__enable_flags & CGL_ENABLE_ALPHA_TEST)
|
||||
else
|
||||
{
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
glDisable (GL_ALPHA_TEST);
|
||||
__enable_flags &= ~CGL_ENABLE_ALPHA_TEST;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user