Update of /cvsroot/java-game-lib/LWJGL/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv1657
Modified Files:
BaseWindow.java
Log Message:
fix: lets keep it at 640*480
Index: BaseWindow.java
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/BaseWindow.java
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/examples/BaseWindow.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- BaseWindow.java 19 Mar 2003 12:41:27 -0000 1.9
+++ BaseWindow.java 28 Mar 2003 23:57:45 -0000 1.10
@@ -66,7 +66,7 @@
gl.loadIdentity();
/* Calculate The Aspect Ratio Of The Window */
- glu.perspective(45.0f, ((float) Display.getWidth()) / ((float) Display.getHeight()), 0.1f, 100.0f);
+ glu.perspective(45.0f, ((float) width) / ((float) height), 0.1f, 100.0f);
/* Select The Modelview Matrix */
gl.matrixMode(GL.MODELVIEW);
@@ -104,7 +104,6 @@
Mouse.destroy();
Keyboard.destroy();
gl.destroy();
- Display.destroy();
}
protected void createGLWindow(int width, int height, int bits, boolean fullscreenflag) throws Exception {
@@ -121,8 +120,7 @@
}
}
- Display.create(modes[mode], 0, 16, 0, fullscreenflag, "LWJGL Example");
- gl = new GL();
+ gl = new GL("LWJGL Example", 50, 50, width, height, bits, 0, 0, 0);
gl.create();
glu = new GLU(gl);
Keyboard.create();
@@ -130,7 +128,7 @@
Mouse.create();
//Mouse.enableBuffer();
- resizeGLScene(Display.getWidth(), Display.getHeight());
+ resizeGLScene(width, height);
initGL();
}
@@ -151,6 +149,7 @@
createGLWindow(width, height, bpp, fullscreen);
do {
+ gl.tick();
/* The frameTime is how much time it takes to draw a single frame.
* We use this so we can animate things in real time.
*
@@ -178,7 +177,7 @@
return true;
}
- gl.swapBuffers();
+ gl.paint();
input(frameTime);
return done;
|