From 8affa29f5466ac475c74cd5224c11980fef7266c Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Tue, 8 Feb 2011 17:23:05 +0000 Subject: [PATCH] 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 --- src/SFML/Window/Linux/GlxContext.cpp | 4 ++++ src/SFML/Window/Win32/WglContext.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/SFML/Window/Linux/GlxContext.cpp b/src/SFML/Window/Linux/GlxContext.cpp index 020f018f4..52c9e0a4b 100644 --- a/src/SFML/Window/Linux/GlxContext.cpp +++ b/src/SFML/Window/Linux/GlxContext.cpp @@ -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) { diff --git a/src/SFML/Window/Win32/WglContext.cpp b/src/SFML/Window/Win32/WglContext.cpp index 54f32e4a5..da7a1dc60 100644 --- a/src/SFML/Window/Win32/WglContext.cpp +++ b/src/SFML/Window/Win32/WglContext.cpp @@ -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) {