From 9824207a74d8f6af49fc3691fc12f5c7ad29aad7 Mon Sep 17 00:00:00 2001 From: spanne Date: Fri, 13 Feb 2009 18:28:58 +0000 Subject: [PATCH] Synchronized WGL behavior with GLX implementation: Do not call the new context creation API when it is not required. Fixing a bug in a previous commit on the way... :-} git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@772 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_window.c b/freeglut/freeglut/src/freeglut_window.c index bce206e..32dd716 100644 --- a/freeglut/freeglut/src/freeglut_window.c +++ b/freeglut/freeglut/src/freeglut_window.c @@ -307,8 +307,8 @@ void fgNewWGLCreateContext( SFG_Window* window ) int attribs[7]; PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB; - if( (fgState.ContextFlags & GLUT_FORWARD_COMPATIBLE) && - (fgState.MajorVersion > 2) ) + /* If nothing fancy has been required, leave the context as it is */ + if ( fgState.MajorVersion == 1 && fgState.MinorVersion == 0 && fgState.ContextFlags == 0 ) { return; }