mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
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:
parent
f5206544ce
commit
8affa29f54
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user