summaryrefslogtreecommitdiff
path: root/cogl/cogl.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-03-06 03:21:30 +0000
committerRobert Bragg <robert@linux.intel.com>2012-08-06 14:27:42 +0100
commit010d16f6479c90b66b7f90ab0341575b41555fca (patch)
tree632ef906e0ce582d86f31ae0381d1cd7af6a60f7 /cogl/cogl.h
parentf729798f031a2d1a90b0dca4f6e290f110acd82b (diff)
downloadcogl-010d16f6479c90b66b7f90ab0341575b41555fca.tar.gz
Adds initial GLES2 integration support
This makes it possible to integrate existing GLES2 code with applications using Cogl as the rendering api. Currently all GLES2 usage is handled with separate GLES2 contexts to ensure that GLES2 api usage doesn't interfere with Cogl's own use of OpenGL[ES]. The api has been designed though so we can provide tighter integration later. The api would allow us to support GLES2 virtualized on top of an OpenGL/GLX driver as well as GLES2 virtualized on the core rendering api of Cogl itself. Virtualizing the GLES2 support on Cogl will allow us to take advantage of Cogl debugging facilities as well as let us optimize the cost of allocating multiple GLES2 contexts and switching between them which can both be very expensive with many drivers. As as a side effect of this patch Cogl can also now be used as a portable window system binding API for GLES2 as an alternative to EGL. Parts of this patch are based on work done by Tomeu Vizoso <tomeu.vizoso@collabora.com> who did the first iteration of adding GLES2 API support to Cogl so that WebGL support could be added to webkit-clutter. This patch adds a very minimal cogl-gles2-context example that shows how to create a gles2 context, clear the screen to a random color and also draw a triangle with the cogl api. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 4bb6eff3dbd50d8fef7d6bdbed55c5aaa70036a8)
Diffstat (limited to 'cogl/cogl.h')
-rw-r--r--cogl/cogl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cogl/cogl.h b/cogl/cogl.h
index 2462984e..797cdb76 100644
--- a/cogl/cogl.h
+++ b/cogl/cogl.h
@@ -108,7 +108,7 @@
#include <cogl/cogl-kms-renderer.h>
#include <cogl/cogl-kms-display.h>
#endif
-#if COGL_HAS_WIN32_SUPPORT
+#ifdef COGL_HAS_WIN32_SUPPORT
#include <cogl/cogl-win32-renderer.h>
#endif
#ifdef COGL_HAS_GLIB_SUPPORT