コード例 #1
0
 private static void checkInput() {
   timer.update();
   camera.processMouse(1, 80, -80);
   camera.processKeyboard(16, 1, 1, 1);
   if (Mouse.isButtonDown(0)) Mouse.setGrabbed(true);
   else if (Mouse.isButtonDown(1)) Mouse.setGrabbed(false);
   while (Keyboard.next()) {
     if (Keyboard.isKeyDown(Keyboard.KEY_P)) {
       currentShaderProgram = perPixelShaderProgram;
     } else if (Keyboard.isKeyDown(Keyboard.KEY_V)) {
       currentShaderProgram = perVertexShaderProgram;
     }
   }
 }
コード例 #2
0
 private static void setUpTimer() {
   timer = new LWJGLTimer();
   timer.initialize();
 }