Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package packageArt;
- import java.nio.ByteBuffer;
- import org.lwjgl.Sys;
- import org.lwjgl.glfw.*;
- import org.lwjgl.opengl.*;
- import static org.lwjgl.glfw.Callbacks.*;
- import static org.lwjgl.glfw.GLFW.*;
- import static org.lwjgl.opengl.GL11.*;
- import static org.lwjgl.system.MemoryUtil.*;
- public class KeyCallback extends GLFWKeyCallback
- {
- @Override
- public void invoke(long window, int key, int scancode, int action, int mods) {
- if(key ==GLFW_KEY_G && action == GLFW_RELEASE)System.out.println("Dupa");
- if ( key == GLFW_KEY_ESCAPE && action == GLFW_RELEASE )
- glfwSetWindowShouldClose(window, GL_TRUE); // We will detect this in our rendering loop
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement