summaryrefslogtreecommitdiff
path: root/cogl/winsys/cogl-winsys-glx.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-12-13 18:57:53 +0000
committerNeil Roberts <neil@linux.intel.com>2011-12-14 16:41:16 +0000
commit616d27f16952d04809398edbf8f9494aac76055a (patch)
tree7dce71999b2ec6169db68557e92bdca20c335f1e /cogl/winsys/cogl-winsys-glx.c
parent9000f8330d1bf798bf7d2347e0c99a6ef0f79944 (diff)
downloadcogl-616d27f16952d04809398edbf8f9494aac76055a.tar.gz
cogl-texture-2d: Fix checking for the EGL winsys
CoglTexture2D had an assert to verify that the EGL winsys was being used. This doesn't make any sense any more because the EGL winsys can't be used directly but instead it is just a base winsys for the platform winsys's. To fix this this patch adds a set of 'criteria' flags to each winsys, one of which is 'uses EGL'. CoglTexture2D can use this to determine if the winsys is supported. Eventually we might want to expose these flags publically so that an application can select a winsys based on certain conditions. For example, an application may need a winsys that uses X or EGL but doesn't care exactly which one it is. Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'cogl/winsys/cogl-winsys-glx.c')
-rw-r--r--cogl/winsys/cogl-winsys-glx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 4e2d9edc..66252de2 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -2056,6 +2056,9 @@ static CoglWinsysVtable _cogl_winsys_vtable =
{
.id = COGL_WINSYS_ID_GLX,
.name = "GLX",
+ .criteria = (COGL_WINSYS_CRITERIA_USES_X11 |
+ COGL_WINSYS_CRITERIA_USES_XLIB),
+
.renderer_get_proc_address = _cogl_winsys_renderer_get_proc_address,
.renderer_connect = _cogl_winsys_renderer_connect,
.renderer_disconnect = _cogl_winsys_renderer_disconnect,