* clutter/cogl/gles/cogl-gles2-wrapper.h:
authorNeil Roberts <neil@openedhand.com>
Tue, 24 Jun 2008 16:21:40 +0000 (16:21 +0000)
committerNeil Roberts <neil@openedhand.com>
Tue, 24 Jun 2008 16:21:40 +0000 (16:21 +0000)
commitd4da3a3e2aa50b7d15b6c7a7a7220cc1f1415b54
tree4822cd9e73b72c1e4f5ee62305208db747601338
parenteac5e21f1c1b67142b96080e0fa9e04199ea6909
* clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-gles2-wrapper.c: All of the settings and
uniforms are now proxied into COGL variables instead of setting
the GL uniforms directly. Just before glDrawArrays is executed a
shader is generated using the given settings to avoid using 'if'
statements. The shaders are cached.

* clutter/cogl/gles/cogl-fixed-vertex-shader.glsl:
* clutter/cogl/gles/cogl-fixed-fragment-shader.glsl: The shaders
are now split into parts using comments instead of 'if' statements
so that the simplest shader can be generated on the fly.

* clutter/cogl/gles/stringify.sh: Now splits up the shader sources
into separate C strings where deliminated by special comments.

* clutter/cogl/gles/cogl-program.h:
* clutter/cogl/gles/cogl-program.c: A custom shader can no longer
be directly linked with the fixed-functionality replacement
because the replacement changes depending on the settings. Instead
the bound shader is linked with the appropriate replacement shader
just before glDrawArrays is executed. The custom uniform variables
must also be proxied through COGL variables because their location
can change when relinked.
ChangeLog
clutter/cogl/gles/cogl-fixed-fragment-shader.glsl
clutter/cogl/gles/cogl-fixed-vertex-shader.glsl
clutter/cogl/gles/cogl-gles2-wrapper.c
clutter/cogl/gles/cogl-gles2-wrapper.h
clutter/cogl/gles/cogl-program.c
clutter/cogl/gles/cogl-program.h
clutter/cogl/gles/stringify.sh