Exemplo n.º 1
0
 private static void checkInput() {
   cam.processMouse(1, 80, -80);
   cam.processKeyboard(16, 1, 1, 1);
   if (Mouse.isButtonDown(0)) {
     Mouse.setGrabbed(true);
   } else if (Mouse.isButtonDown(1)) {
     Mouse.setGrabbed(false);
   }
 }
 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;
     }
   }
 }