Changed the returned OpenGL context version from 2.9 to 2.0, if creating a context >= 3.0 failed

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1791 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2011-02-08 17:23:05 +00:00
parent f5206544ce
commit 8affa29f54
2 changed files with 8 additions and 0 deletions

View File

@ -270,6 +270,10 @@ void GlxContext::CreateContext(GlxContext* shared, unsigned int bitsPerPixel, co
// If the OpenGL >= 3.0 context failed or if we don't want one, create a regular OpenGL 1.x/2.x context
if (!myContext)
{
// set the context version to 2.0 (arbitrary)
mySettings.MajorVersion = 2;
mySettings.MinorVersion = 0;
myContext = glXCreateContext(myDisplay, bestVisual, toShare, true);
if (!myContext)
{

View File

@ -290,6 +290,10 @@ void WglContext::CreateContext(WglContext* shared, unsigned int bitsPerPixel, co
// If the OpenGL >= 3.0 context failed or if we don't want one, create a regular OpenGL 1.x/2.x context
if (!myContext)
{
// set the context version to 2.0 (arbitrary)
mySettings.MajorVersion = 2;
mySettings.MinorVersion = 0;
myContext = wglCreateContext(myDeviceContext);
if (!myContext)
{