Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-10 22:21:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-10 22:21:46 +0300
commit6b4a8c5d722f13576cf486b2f8b9a190c7970781 (patch)
tree62c9955c1766789334ce89a20334f1399ea0ce61 /intern/ghost
parent20df075e38efe9f1cbf538b3e5b5791aac01a483 (diff)
attemp to fix [#20610] GHOST_WindowX11.cpp:202: X11 glXChooseVisual() failed, verify working openGL system!
cant test but should work.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 4afaa09b3f1..c500055c280 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -169,7 +169,7 @@ GHOST_WindowX11(
// Set up the minimum atrributes that we require and see if
// X can find us a visual matching those requirements.
- int attributes[40], i = 0;
+ int attributes[40], i = 0, i_pre_aa;
Atom atoms[2];
int natom;
int glxVersionMajor, glxVersionMinor; // As in GLX major.minor
@@ -188,6 +188,7 @@ GHOST_WindowX11(
attributes[i++] = GLX_BLUE_SIZE; attributes[i++] = 1;
attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1;
attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1;
+ i_pre_aa= i;
/* GLX 1.4+, multi-sample */
if(m_numOfAASamples && (glxVersionMajor >= 1) && (glxVersionMinor >= 4)) {
attributes[i++] = GLX_SAMPLE_BUFFERS; attributes[i++] = 1;
@@ -198,9 +199,17 @@ GHOST_WindowX11(
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, verify working openGL system!\n", __FILE__, __LINE__);
- return;
+ /* possibly the X Server does not support GLX_SAMPLE_BUFFERS */
+ attributes[i_pre_aa] = 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, verify working openGL system!\n", __FILE__, __LINE__);
+ return;
+ } else {
+ printf("%s:%d: X11 glXChooseVisual() multi-sample failed, continue with multisample disabled\n", __FILE__, __LINE__);
+ }
}
memset(&m_xtablet, 0, sizeof(m_xtablet));