After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672711 - Make Mutter and Gnome Shell stop relying on Cogl including a GL header
Make Mutter and Gnome Shell stop relying on Cogl including a GL header
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-23 19:19 UTC by Neil Roberts
Modified: 2012-04-25 14:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
meta-texture-rectangle: Use Cogl's API to create a rectangle texture (12.81 KB, patch)
2012-03-23 19:20 UTC, Neil Roberts
accepted-commit_now Details | Review
st-theme-node-drawing: Don't use GL types (970 bytes, patch)
2012-03-23 19:21 UTC, Neil Roberts
accepted-commit_now Details | Review

Description Neil Roberts 2012-03-23 19:19:29 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.
Comment 1 Neil Roberts 2012-03-23 19:20:17 UTC
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.
Comment 2 Neil Roberts 2012-03-23 19:21:32 UTC
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.
Comment 3 Neil Roberts 2012-03-23 19:26:04 UTC
Just for reference, the Cogl patch with some discussion is here:

http://lists.freedesktop.org/archives/cogl/2012-March/000057.html
Comment 4 Neil Roberts 2012-03-30 11:18:43 UTC
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.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-04-24 15:35:27 UTC
Review of attachment 210465 [details] [review]:

Looks fine to me.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-04-24 15:37:31 UTC
Review of attachment 210464 [details] [review]:

This looks fine to me.