Fix GLES 2 after the multiple-texture-rectangle branch merge
authorNeil Roberts <neil@linux.intel.com>
Thu, 27 Nov 2008 16:44:39 +0000 (16:44 +0000)
committerNeil Roberts <neil@linux.intel.com>
Tue, 13 Jan 2009 16:52:39 +0000 (16:52 +0000)
commitde114dead76af8e8cccf872dd87aeee838e9e7e8
treeb707e3a75956571757b268718634d4626d808d71
parent453697fcad0cb8e91c23b3ccebf07ed8ca10591d
Fix GLES 2 after the multiple-texture-rectangle branch merge

The GLES 2 wrapper needs to set up some state before each
draw. Previously this was acheived by wrapping glDrawArrays. Since the
multiple-texture-rectangle branch merge, glDrawElements is used
instead so we also need a wrapper for that.

It was also directly calling glBindTexture. GLES 2 uses a wrapper for
this function so that it can cope with GL_ALPHA format textures. The
format of the current texture needs to be stored as well as the target
and object number for this to work.
clutter/cogl/gles/cogl-context.h
clutter/cogl/gles/cogl-gles2-wrapper.c
clutter/cogl/gles/cogl-gles2-wrapper.h
clutter/cogl/gles/cogl-texture.c