[cairo-bugs] [Bug 47480] dynamically load libGL when an application requests a GL context

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 28 05:31:16 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=47480

--- Comment #2 from Neil Roberts <neil at linux.intel.com> 2012-03-28 05:31:16 PDT ---
I think this could be a good idea anyway because libGL is a bit of a special
case. Having Cairo link directly against libGL is awkward if your application
is trying to use libGLESv2 because it provides most of the same symbols as
libGL. For example if the application is just trying to use Cairo for the image
surface backend and it links directly against libGLES it can end up
accidentally using some symbols from libGL depending on the order they are
linked in. Mesa starts doing weird things when this happens.

I already hit this problem when trying to use Cogl with GLES2 because Cogl also
indirectly depends on Cairo. Cogl now dlopens its GL library depending on the
backend to avoid this. That also enables us to choose between the GL and GLES2
backend with a runtime configuration option. Presumably Cairo could also
benefit from that seeing as it has both gl and gles surface backends?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the cairo-bugs mailing list