← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2138: Fix weird crash http://www.mail-archive.com/yade-users@xxxxxxxxxxxxxxxxxxx/msg01482.html in glGet...

 

------------------------------------------------------------
revno: 2138
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-04-11 21:40:58 +0200
message:
  Fix weird crash http://www.mail-archive.com/yade-users@xxxxxxxxxxxxxxxxxxx/msg01482.html in glGetError() (disable error check)
modified:
  pkg/common/RenderingEngine/OpenGLRenderingEngine.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/common/RenderingEngine/OpenGLRenderingEngine.cpp'
--- pkg/common/RenderingEngine/OpenGLRenderingEngine.cpp	2010-04-09 11:25:18 +0000
+++ pkg/common/RenderingEngine/OpenGLRenderingEngine.cpp	2010-04-11 19:40:58 +0000
@@ -50,8 +50,12 @@
 	}
 
 	initDone=true;
-	int e=glGetError();
-	if(e!=GL_NO_ERROR) throw runtime_error((string("OpenGLRenderingEngine::init returned GL error ")+lexical_cast<string>(e)).c_str());
+	// glGetError crashes at some machines?! Was never really useful, anyway.
+	// reported http://www.mail-archive.com/yade-users@xxxxxxxxxxxxxxxxxxx/msg01482.html
+	#if 0
+		int e=glGetError();
+		if(e!=GL_NO_ERROR) throw runtime_error((string("OpenGLRenderingEngine::init returned GL error ")+lexical_cast<string>(e)).c_str());
+	#endif
 }
 
 void OpenGLRenderingEngine::setBodiesRefSe3(){