From d46bc5d297792a1b86a5b101ff4bb1f53ef7daac Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 22 Apr 2008 21:26:39 +0000 Subject: [PATCH] Fixed KeyboardTest --- src/java/org/lwjgl/test/input/KeyboardTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/java/org/lwjgl/test/input/KeyboardTest.java b/src/java/org/lwjgl/test/input/KeyboardTest.java index c4d68c0c..c8845391 100644 --- a/src/java/org/lwjgl/test/input/KeyboardTest.java +++ b/src/java/org/lwjgl/test/input/KeyboardTest.java @@ -36,6 +36,7 @@ import org.lwjgl.opengl.Display; import org.lwjgl.opengl.DisplayMode; import org.lwjgl.opengl.GL11; import org.lwjgl.util.vector.Vector2f; +import org.lwjgl.util.glu.GLU; /** *
@@ -104,7 +105,13 @@ public class KeyboardTest { } 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() {