From: <eli...@us...> - 2007-04-28 20:10:36
|
Revision: 2808 http://svn.sourceforge.net/java-game-lib/?rev=2808&view=rev Author: elias_naur Date: 2007-04-28 13:10:21 -0700 (Sat, 28 Apr 2007) Log Message: ----------- Make sure the swap interval is reset in Display when switching Display modes and toggling fullscreen Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2007-04-26 07:13:02 UTC (rev 2807) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2007-04-28 20:10:21 UTC (rev 2808) @@ -223,7 +223,7 @@ if (fullscreen) switchDisplayMode(); createWindow(); - makeCurrent(); + makeCurrentAndSetSwapInterval(); } catch (LWJGLException e) { destroyContext(); destroyPeerInfo(); @@ -475,7 +475,7 @@ display_impl.resetDisplayMode(); } createWindow(); - makeCurrent(); + makeCurrentAndSetSwapInterval(); } catch (LWJGLException e) { destroyContext(); destroyPeerInfo(); @@ -744,7 +744,7 @@ try { context = new Context(peer_info, shared_drawable != null ? shared_drawable.getContext() : null); try { - makeCurrent(); + makeCurrentAndSetSwapInterval(); initContext(); } catch (LWJGLException e) { destroyContext(); @@ -765,8 +765,12 @@ } } + private static void makeCurrentAndSetSwapInterval() throws LWJGLException { + makeCurrent(); + setSwapInterval(swap_interval); + } + private static void initContext() { - setSwapInterval(swap_interval); // Put the window into orthographic projection mode with 1:1 pixel ratio. // We haven't used GLU here to do this to avoid an unnecessary dependency. GL11.glMatrixMode(GL11.GL_PROJECTION); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |