XVisualInfo *visuals;
GLXFBConfig *fbconfigs;
+
+ int glx_maj, glx_min;
};
/* get list of all fbconfigs on this screen */
GLX_drv->fbconfigs = glXGetFBConfigs(disp->Xdpy, DefaultScreen(disp->Xdpy), &numVisuals);
- if (numVisuals == 0)
+ if (numVisuals == 0) {
+ GLX_drv->fbconfigs = NULL;
goto xvisual;
+ }
for (i = 0; i < numVisuals; i++) {
struct GLX_egl_config *config;
}
}
+ glXQueryVersion(disp->Xdpy, &GLX_drv->glx_maj, &GLX_drv->glx_min);
+
GLX_drv->Base.Initialized = EGL_TRUE;
GLX_drv->Base.Name = "GLX";
if (!GLX_drv)
return NULL;
- glXQueryVersion(disp->Xdpy, &maj, &min);
-
_eglInitDriverFallbacks(&GLX_drv->Base);
GLX_drv->Base.API.Initialize = GLX_eglInitialize;
GLX_drv->Base.API.Terminate = GLX_eglTerminate;
GLX_drv->Base.API.MakeCurrent = GLX_eglMakeCurrent;
GLX_drv->Base.API.CreateWindowSurface = GLX_eglCreateWindowSurface;
#ifdef GLX_VERSION_1_3
- if (maj == 1 && min >= 3) {
+ if (GLX_drv->glx_maj == 1 && GLX_drv->glx_min >= 3) {
GLX_drv->Base.API.CreatePixmapSurface = GLX_eglCreatePixmapSurface;
GLX_drv->Base.API.CreatePbufferSurface = GLX_eglCreatePbufferSurface;
printf("GLX: Pbuffer and Pixmap support\n");