mutter/examples
Neil Roberts 17c818a9a7 Add an SDL2 winsys
This adds an alternate version of the SDL winsys using the SDL 2 API.
The two versions are mutually exclusive and share the same
CoglWinsysID. Version 2 of SDL fits a little bit better with Cogl
because it supports multiple windows and the video subsystem can be
initialised entirely independently of the rest of the subsystems.

The SDL2 winsys creates an invisible dummy window in order to bind the
GL context after creating the Cogl display. This is similar to how the
X11 winsys's work.

SDL2 seems to support compiling with support for both GL and GLES.
However there doesn't seem to be a way to select between the two
backends outside of SDL. In fact if you do compile them both in it
seems to break down because it will always try to use the window
system functions from the GLES backend because those are filled in
second in the vtable. However when creating the window it will always
prefer to use the GL function to choose a visual. This function gets
confused because the GL backend has not been initialised at that
point. The Cogl backend therefore just leaves it up to SDL to pick a
sensible backend. It will then verify that it picked a GL library
which matches the Cogl driver by checking the string from
glGetString(GL_VERSION).

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 6cb5ab41355e7bfe28f367cf4afa39a7afcfeec2)
2012-08-06 14:27:44 +01:00
..
android/hello android: Update the hello example to the latest glib-android API change 2011-08-12 17:24:19 +01:00
cogl-crate.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-gles2-context.c Adds gles2-context renderer constraint 2012-08-06 14:27:43 +01:00
cogl-gles2-gears.c Adds gles2-context renderer constraint 2012-08-06 14:27:43 +01:00
cogl-hello.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-info.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-msaa.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-sdl2-hello.c Add an SDL2 winsys 2012-08-06 14:27:44 +01:00
cogl-sdl-hello.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-x11-foreign.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-x11-tfp.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogland.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
crate.jpg Adds another example that draws a 3D crate 2011-06-30 14:33:11 +01:00
Makefile.am Add an SDL2 winsys 2012-08-06 14:27:44 +01:00