Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. package packageArt;
  2. import java.nio.ByteBuffer;
  3.  
  4. import org.lwjgl.Sys;
  5. import org.lwjgl.glfw.*;
  6. import org.lwjgl.opengl.*;
  7.  
  8. import static org.lwjgl.glfw.Callbacks.*;
  9. import static org.lwjgl.glfw.GLFW.*;
  10. import static org.lwjgl.opengl.GL11.*;
  11. import static org.lwjgl.system.MemoryUtil.*;
  12.  
  13. public class KeyCallback  extends GLFWKeyCallback
  14. {
  15.     @Override
  16.     public void invoke(long window, int key, int scancode, int action, int mods) {
  17.         if(key ==GLFW_KEY_G && action == GLFW_RELEASE)System.out.println("Dupa");
  18.         if ( key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE )
  19.             glfwSetWindowShouldClose(window, GL_TRUE); // We will detect this in our rendering loop
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement