Permalink
Browse files

ecere/XInterface:OpenGL: Added code for obtaining a visual info throu…

…gh glXChooseVisual when first attempt through FBConfig failed
  • Loading branch information...
1 parent 32b7896 commit 6d3cc91b2e161c71f2b44b3704294fd878353773 @jerstlouis jerstlouis committed Sep 3, 2012
Showing with 13 additions and 1 deletion.
  1. +13 −1 ecere/src/gui/drivers/XInterface.ec
@@ -2053,7 +2053,19 @@ class XInterface : Interface
if(samples == 1) samples = 0;
else if(!samples) alpha = false;
}
- }
+ }
+ if(!visualInfo)
+ {
+ int attrList[] =
+ {
+ GLX_USE_GL, GLX_DEPTH_SIZE, 1,
+ GLX_RGBA,
+ GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1,
+ GLX_DOUBLEBUFFER,
+ None
+ };
+ visualInfo = glXChooseVisual(xGlobalDisplay, DefaultScreen(xGlobalDisplay), attrList);
+ }
#endif
depth = visualInfo ? visualInfo->depth : (window.alphaBlend ? 32 : xSystemDepth);
visual = visualInfo ? visualInfo->visual : (window.alphaBlend ? FindFullColorVisual (xGlobalDisplay, &depth) : xSystemVisual);

0 comments on commit 6d3cc91

Please sign in to comment.