[cairo] [PATCH] [cairo-gl] Use dispatch mechanism to abstract differences between GL versions (and remove GLEW)
Alexandros Frantzis
alexandros.frantzis at linaro.org
Mon Dec 6 14:49:28 PST 2010
Hi all!
I have arrived at what I believe to be a sensible and versatile
mechanism for dealing with the differences between GL versions and
extensions and also for removing GLEW. This is a good first step for
making the cairo-gl backend more GLES2 friendly, while still retaining
Desktop GL compatibility (even 1.x).
The proposed changes introduce a dispatch mechanism for calling certain
GL functions that have different names depending on the version and
extensions that are supported. This mechanism makes it possible in many
cases to have a single code path for all supported versions.
An example of a such a simplification is the removal of the GL 1.x ARB
shader implementation. GL 1.x is served by the same implementation as GL
2.x by using the dispatch table.
The branch has been tested successfully on Mesa on i915 (GL 1.4) and with the
software renderer (GL 2.1).
The 'gl-remove-glew' branch can be found at:
http://git.linaro.org/gitweb?p=people/afrantzis/cairo.git;a=shortlog;h=refs/heads/gl-remove-glew
git://git.linaro.org/people/afrantzis/cairo.git
Thanks,
Alexandros
More information about the cairo
mailing list