| 
      
      
      From: <eli...@us...> - 2008-04-22 21:26:47
      
     | 
| Revision: 3042
          http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3042&view=rev
Author:   elias_naur
Date:     2008-04-22 14:26:39 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Fixed KeyboardTest
Modified Paths:
--------------
    trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java	2008-04-22 20:32:32 UTC (rev 3041)
+++ trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java	2008-04-22 21:26:39 UTC (rev 3042)
@@ -36,6 +36,7 @@
 import org.lwjgl.opengl.DisplayMode;
 import org.lwjgl.opengl.GL11;
 import org.lwjgl.util.vector.Vector2f;
+import org.lwjgl.util.glu.GLU;
 
 /**
  * <br>
@@ -104,7 +105,13 @@
   }
 
   private void initializeOpenGL() {
-    GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+	  GL11.glMatrixMode(GL11.GL_PROJECTION);
+	  GL11.glLoadIdentity();
+	  GLU.gluOrtho2D(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight());
+	  GL11.glMatrixMode(GL11.GL_MODELVIEW);
+	  GL11.glLoadIdentity();
+	  GL11.glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());
+	  GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
   }
 
   public void executeTest() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |