GNOME Bugzilla – Bug 672711
Make Mutter and Gnome Shell stop relying on Cogl including a GL header
Last modified: 2012-04-25 14:52:08 UTC
We are considering stopping Cogl from including a GL header from its public headers. Mutter currently relies on this to create rectangle textures and Gnome Shell is using a spurious GLfloat where it could just use a regular float. These would need to be patched if Cogl changes.
Created attachment 210464 [details] [review] meta-texture-rectangle: Use Cogl's API to create a rectangle texture Cogl now has public experimental API to create a rectangle texture which we can use instead of creating a foreign texture with GL. This avoids Mutter depending on Cogl including a GL header from its public headers which it might not do in future.
Created attachment 210465 [details] [review] st-theme-node-drawing: Don't use GL types This swaps a use of GLfloat for a regular float. Cogl might stop including a GL header in its public headers soon so this would fix a compilation error.
Just for reference, the Cogl patch with some discussion is here: http://lists.freedesktop.org/archives/cogl/2012-March/000057.html
Ping, is there any feedback on these patches? Just for some more background, the reason we want to stop including a GL header from the public Cogl headers is that we want to provide a GLES2 context API from Cogl so that you can use the GLES2 API to render into a CoglFramebuffer without trashing Cogl's GL state. Applications that do this would need to include GLES2/gl2.h but this would clash with the regular GL header included by Cogl. An alternative patch to the first one could be to just make meta-texture-rectangle start explicitly including GL.h but it seemed like a good opportunity to make it use the newer rectangle texture API from Cogl anyway.
Review of attachment 210465 [details] [review]: Looks fine to me.
Review of attachment 210464 [details] [review]: This looks fine to me.
Ok, I've pushed these both. Thanks. http://git.gnome.org/browse/mutter/commit/?id=ed358c8f4b1200e8532dcc0b249f51752d2695eb http://git.gnome.org/browse/gnome-shell/commit/?id=5d98e2bf04891f3d6144cceb1e26f58e72d1fc02