[mapserver-commits] r11493 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Apr 7 02:20:28 EDT 2011


Author: toby
Date: 2011-04-06 23:20:27 -0700 (Wed, 06 Apr 2011)
New Revision: 11493

Modified:
   trunk/mapserver/mapoglcontext.cpp
Log:
Removed calls to glGetError before OpenGl context is ready which causes a crash. (#3791)

Modified: trunk/mapserver/mapoglcontext.cpp
===================================================================
--- trunk/mapserver/mapoglcontext.cpp	2011-04-07 03:32:08 UTC (rev 11492)
+++ trunk/mapserver/mapoglcontext.cpp	2011-04-07 06:20:27 UTC (rev 11493)
@@ -199,13 +199,13 @@
 {
 	if (!(sharingContext=wglCreateContext(window)))
 	{
-		msSetError(MS_OGLERR, "Can't Create A GL Rendering Context. glError: %d", "OglContext::createContext()", glGetError());
+		msSetError(MS_OGLERR, "Can't Create A GL Rendering Context.", "OglContext::createContext()");
 		return FALSE;
 	}
 
 	if(!wglMakeCurrent(window,sharingContext))
 	{
-		msSetError(MS_OGLERR, "Can't Activate The GL Rendering Context. glError: %d", "OglContext::createContext()", glGetError());
+		msSetError(MS_OGLERR, "Can't Activate The GL Rendering Context.", "OglContext::createContext()");
 		return FALSE;
 	}
 
@@ -448,14 +448,14 @@
 
 	if (tempConfigs == NULL || num_configs == 0)
 	{
-		msSetError(MS_OGLERR, "glXChooseFBConfig could not find any configs. Likely your video card or drivers are not supported. glError: %d", "OglContext::initWindow()", glGetError());
+		msSetError(MS_OGLERR, "glXChooseFBConfig could not find any configs. Likely your video card or drivers are not supported.", "OglContext::initWindow()");
 		return false;
 	}
 
 	GLXContext tempContext = glXCreateNewContext(window, *tempConfigs, GLX_RGBA_TYPE, NULL, 1);
 	if (tempContext == NULL)
 	{
-		msSetError(MS_OGLERR, "glXCreateNewContext failed. glError: %d", "OglContext::initWindow()", glGetError());
+		msSetError(MS_OGLERR, "glXCreateNewContext failed.", "OglContext::initWindow()");
 		return false;
 	}
 
@@ -464,13 +464,13 @@
 	GLXPbuffer tempBuffer = glXCreatePbuffer(window, *tempConfigs, iPbufferAttributes);
 	if (tempBuffer == 0)
 	{
-		msSetError(MS_OGLERR, "glXCreatePbuffer failed. glError: %d", "OglContext::initWindow()", glGetError());
+		msSetError(MS_OGLERR, "glXCreatePbuffer failed.", "OglContext::initWindow()");
 		return false;
 	}
 
 	if (!glXMakeCurrent(window, tempBuffer, tempContext))
 	{
-		msSetError(MS_OGLERR, "glXMakeCurrent failed. glError: %d", "OglContext::initWindow()", glGetError());
+		msSetError(MS_OGLERR, "glXMakeCurrent failed.", "OglContext::initWindow()");
 		return false;
 	}
 



More information about the mapserver-commits mailing list