diff options
author | Guillermo S. Romero <gsr.b3d@infernal-iceberg.com> | 2010-01-08 02:23:00 +0300 |
---|---|---|
committer | Guillermo S. Romero <gsr.b3d@infernal-iceberg.com> | 2010-01-08 02:23:00 +0300 |
commit | 840ae920524dcddd7370577805963f98eea602a4 (patch) | |
tree | d263e643b23a03c6e80bf68a9ba7ecdf6174a322 /intern/ghost | |
parent | f3a6474537155e60f5db2a101b5ba11e20860307 (diff) |
Do not ask for AA if not supported.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 5e6e765457c..f99cda173bb 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -171,8 +171,14 @@ GHOST_WindowX11( int attributes[40], i = 0; Atom atoms[2]; - int natom; - + int natom; + int glxVersionMajor, glxVersionMinor; // As in GLX major.minor + + if (!glXQueryVersion(m_display, &glxVersionMajor, &glxVersionMinor)) { + printf("%s:%d: X11 glXQueryVersion() failed, verify working openGL system!\n", __FILE__, __LINE__); + return; + } + if(m_stereoVisual) attributes[i++] = GLX_STEREO; @@ -183,15 +189,17 @@ GHOST_WindowX11( attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1; attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1; /* GLX 1.4+, multi-sample */ - attributes[i++] = GLX_SAMPLE_BUFFERS; attributes[i++] = 1; - attributes[i++] = GLX_SAMPLES; attributes[i++] = m_numOfAASamples; + if((glxVersionMajor >= 1) && (glxVersionMinor >= 4)) { + attributes[i++] = GLX_SAMPLE_BUFFERS; attributes[i++] = 1; + attributes[i++] = GLX_SAMPLES; attributes[i++] = m_numOfAASamples; + } attributes[i] = None; m_visual = glXChooseVisual(m_display, DefaultScreen(m_display), attributes); if (m_visual == NULL) { // barf : no visual meeting these requirements could be found. - printf("%s:%d: X11 glxChooseVisual() failed for OpenGL, verify working openGL system!\n", __FILE__, __LINE__); + printf("%s:%d: X11 glXChooseVisual() failed, verify working openGL system!\n", __FILE__, __LINE__); return; } |