glx: Bail from _renderer_connect if not GL driver

The GLX winsys is only compatible with GL drivers so we now bail out
from cogl-winsys-glx.c:_cogl_winsys_renderer_connect if a GLES driver
has been chosen.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-07-22 00:00:51 +01:00
parent 6e6620e089
commit 912d46817e

View File

@ -312,6 +312,14 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
if (!_cogl_xlib_renderer_connect (renderer, error))
goto error;
if (renderer->driver != COGL_DRIVER_GL)
{
g_set_error (error, COGL_WINSYS_ERROR,
COGL_WINSYS_ERROR_INIT,
"GLX Backend can only be used in conjunction with OpenGL");
goto error;
}
glx_renderer->libgl_module = g_module_open (COGL_GL_LIBNAME,
G_MODULE_BIND_LAZY);