maybe better just just use symbolic to switch between EGL and XGL <br><br><div class="gmail_quote">2010/11/10 Kristian Høgsberg <span dir="ltr"><<a href="mailto:krh@bitplanet.net">krh@bitplanet.net</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Wed, Nov 10, 2010 at 12:37 AM, Chia-I Wu <<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>> wrote:<br>
> Hi list,<br>
><br>
> I am curious which library should, say, gears links to when it is<br>
> ported to OpenGL ES 2.0. libGL.so or libGLESv2.so? I'd like to say<br>
> libGLESv2, but cairo links to libGL and there is going to be a<br>
> conflict: both libraries export _glapi_tls_Dispatch for current<br>
> dispatch table. It is not possible to tell which _glapi_tls_Dispatch<br>
> eglMakeCurrent will update and which one glDrawArrays will use.<br>
<br>
Yup, that is a problem. Ideally cairo-gl should support GL and GLES2,<br>
maybe even dlopen libGL.so or libGLESv2.so at runtime so we could<br>
support both in one cairo build. As it is now, it's just hardcoded<br>
full GL support. cairo-gl isn't a core dependency for wayland though,<br>
just for the demo clients. Qt, for example, lets you select GL, GLES1<br>
or GLES2 at compile time, which is then used for the entire stack.<br>
<br>
Cairo gl uses glew for looking up extensions, but I think it would<br>
make sense to just use a cairo-specific function table that would hold<br>
the required core functions as well as the extension functions needed<br>
by cairo. That way you can specify the GL dialect at runtime and<br>
cairo-gl will open the right .so and lookup the necessary extension<br>
functions for that dialect.<br>
<br>
For the demo clients, it may be nice to move the cairo dependency out<br>
of the toytoolkit, but even then, the toy toolkit still has to use<br>
libGL, since otherwise it won't work with cairo-gl.<br>
<br>
Kristian<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</blockquote></div><br>