mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
17c818a9a7
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) |
||
---|---|---|
.. | ||
cogl-texture-pixmap-x11-private.h | ||
cogl-texture-pixmap-x11.c | ||
cogl-texture-pixmap-x11.h | ||
cogl-winsys-egl-android-private.h | ||
cogl-winsys-egl-android.c | ||
cogl-winsys-egl-feature-functions.h | ||
cogl-winsys-egl-gdl-private.h | ||
cogl-winsys-egl-gdl.c | ||
cogl-winsys-egl-kms-private.h | ||
cogl-winsys-egl-kms.c | ||
cogl-winsys-egl-null-private.h | ||
cogl-winsys-egl-null.c | ||
cogl-winsys-egl-private.h | ||
cogl-winsys-egl-wayland-private.h | ||
cogl-winsys-egl-wayland.c | ||
cogl-winsys-egl-x11-private.h | ||
cogl-winsys-egl-x11.c | ||
cogl-winsys-egl.c | ||
cogl-winsys-glx-feature-functions.h | ||
cogl-winsys-glx-private.h | ||
cogl-winsys-glx.c | ||
cogl-winsys-private.h | ||
cogl-winsys-sdl2.c | ||
cogl-winsys-sdl-private.h | ||
cogl-winsys-sdl.c | ||
cogl-winsys-stub-private.h | ||
cogl-winsys-stub.c | ||
cogl-winsys-wgl-feature-functions.h | ||
cogl-winsys-wgl-private.h | ||
cogl-winsys-wgl.c | ||
cogl-winsys.c |