diff options
author | Alan Hourihane <alanh@vmware.com> | 2008-12-23 14:18:36 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@vmware.com> | 2008-12-23 14:18:36 +0000 |
commit | 04ef91af8bf77b483249719ddc02839acd192f42 (patch) | |
tree | e4474ed8848ab4d7f2ea2100e4d0b6f6792d0687 /src/egl | |
parent | 90039225935a817ee6004dfabc8f5c404affc726 (diff) |
egl: fix startup query version
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/glx/egl_glx.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c index ae3a4abd0a..2c0844665d 100644 --- a/src/egl/drivers/glx/egl_glx.c +++ b/src/egl/drivers/glx/egl_glx.c @@ -109,6 +109,8 @@ struct GLX_egl_driver XVisualInfo *visuals; GLXFBConfig *fbconfigs; + + int glx_maj, glx_min; }; @@ -350,8 +352,10 @@ create_configs(_EGLDisplay *disp, struct GLX_egl_driver *GLX_drv) /* 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; @@ -444,6 +448,8 @@ GLX_eglInitialize(_EGLDriver *drv, EGLDisplay dpy, } } + glXQueryVersion(disp->Xdpy, &GLX_drv->glx_maj, &GLX_drv->glx_min); + GLX_drv->Base.Initialized = EGL_TRUE; GLX_drv->Base.Name = "GLX"; @@ -773,8 +779,6 @@ _eglMain(_EGLDisplay *disp, const char *args) 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; @@ -782,7 +786,7 @@ _eglMain(_EGLDisplay *disp, const char *args) 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"); |