|
From: <eli...@us...> - 2006-05-30 12:42:20
|
Revision: 2346 Author: elias_naur Date: 2006-05-30 05:41:49 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2346&view=rev Log Message: ----------- Change AWTGLCanvas paint() to make current and release the context to avoid problems with different AWT event threads calling paint() Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2006-05-30 08:48:16 UTC (rev 2345) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2006-05-30 12:41:49 UTC (rev 2346) @@ -270,13 +270,16 @@ context.makeCurrent(); initGL(); } - if (!context.isCurrent()) - context.makeCurrent(); - if (update_context) { - context.update(); - update_context = false; + context.makeCurrent(); + try { + if (update_context) { + context.update(); + update_context = false; + } + paintGL(); + } finally { + Context.releaseCurrentContext(); } - paintGL(); } finally { peer_info.unlock(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |