Guest

Untitled

By: a guest on Feb 11th, 2012  |  syntax: Java  |  size: 0.64 KB  |  hits: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. package rubesoft.games.testengine;
  2.  
  3. import org.lwjgl.LWJGLException;
  4. import org.lwjgl.opengl.Display;
  5. import org.lwjgl.opengl.DisplayMode;
  6.  
  7. public class TestEngine {
  8.         public void start() {
  9.                 try {
  10.                         Display.setDisplayMode(new DisplayMode(640,480));
  11.                         Display.create();
  12.                 } catch (LWJGLException e) {
  13.                         e.printStackTrace();
  14.                         System.exit(0);
  15.                 }
  16.                
  17.                 // init OpenGL here
  18.                
  19.                 while (!Display.isCloseRequested()) {
  20.                        
  21.                         // render OpenGL here
  22.                        
  23.                         Display.update();
  24.                 }
  25.                
  26.                 Display.destroy();
  27.         }
  28.        
  29.         public static void main(String[] argv) {
  30.                 TestEngine displayExample = new TestEngine();
  31.                 displayExample.start();
  32.         }
  33. }