mutter/cogl/driver/gles
Neil Roberts 058d79dce2 cogl: Make it easier to add checks for GL extensions
Previously if you need to depend on a new GL feature you had to:

- Add typedefs for all of the functions in cogl-defines.h.in

- Add function pointers for each of the functions in
  cogl-context-driver.h

- Add an initializer for the function pointers in
  cogl-context-driver.c

- Add a check for the extension and all of the functions in
  cogl_features_init. If the extension is available under multiple
  names then you have to duplicate the checks.

This is quite tedious and error prone. This patch moves all of the
features and their functions into a list of macro invocations in
cogl-feature-functions.h. The macros can be redefined to implement all
of the above tasks from the same header.

The features are described in a struct with a pointer to a table of
functions. A new function takes the feature description from this
struct and checks for its availability. The feature can take a list of
extension names with a list of alternate namespaces (such as "EXT" or
"ARB"). It can also detect the feature from a particular version of
GL.

The typedefs are now gone and instead the function pointer in the Cogl
context just directly contains the type.

Some of the functions in the context were previously declared with the
'ARB' extension. This has been removed so that now all the functions
have no suffix. This makes more sense when the extension could
potentially be merged into GL core as well.
2009-11-17 15:11:26 +00:00
..
cogl-context-driver.c cogl: Make it easier to add checks for GL extensions 2009-11-17 15:11:26 +00:00
cogl-context-driver.h cogl: Make it easier to add checks for GL extensions 2009-11-17 15:11:26 +00:00
cogl-defines.h.in cogl: Make it easier to add checks for GL extensions 2009-11-17 15:11:26 +00:00
cogl-feature-functions.h cogl: Make it easier to add checks for GL extensions 2009-11-17 15:11:26 +00:00
cogl-fixed-fragment-shader.glsl Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-fixed-vertex-shader.glsl Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-gles2-wrapper.c Fix some compilation errors in cogl-gles2-wrapper.c 2009-10-22 18:04:59 +01:00
cogl-gles2-wrapper.h [gles2] remove lots of redundant matrix stack code 2009-10-20 12:32:51 +01:00
cogl-program.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-program.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-shader-private.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-shader.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-texture-driver.c [cogl-texture] Split CoglTexture into an abstract class + CoglTexture2dSliced 2009-10-16 18:58:51 +01:00
cogl-util.c Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl-util.h Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00
cogl.c cogl: Make it easier to add checks for GL extensions 2009-11-17 15:11:26 +00:00
Makefile.am [cogl-primitives] Get rid of driver specific cogl-primitives code 2009-11-04 16:02:34 +00:00
stringify.sh Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys 2009-10-16 18:58:50 +01:00