diff --git a/AUTHORS b/AUTHORS index 7641b0c14..9eda98519 100644 --- a/AUTHORS +++ b/AUTHORS @@ -58,3 +58,4 @@ a license to everyone to use it as detailed in LICENSE.) * Felix H. Dahlke * Éloi Rivard +>>>>>>> * OpenGL extensions. diff --git a/tests/glfw/glfwsample.c b/tests/glfw/glfwsample.c index 771537c58..3d9be100e 100644 --- a/tests/glfw/glfwsample.c +++ b/tests/glfw/glfwsample.c @@ -67,8 +67,8 @@ void Init() glfwSetWindowSizeCallback(OnResize); glfwSetWindowRefreshCallback(OnRefresh); glfwSetMouseWheelCallback(OnMouseWheel); - glfwSetMousePosCallback(OnMouseMove); - glfwSetMouseButtonCallback(OnMouseClick); + //glfwSetMousePosCallback(OnMouseMove); + //glfwSetMouseButtonCallback(OnMouseClick); // set the projection matrix to a normal frustum with a max depth of 50 glMatrixMode(GL_PROJECTION); @@ -289,14 +289,15 @@ char* GetParamName(int param){ default : return "Invalid param"; } } + void OnKeyPressed( int key, int action ){ const char* key_name = GetKeyName(key); if(key_name == 0) return; if(action == GLFW_PRESS) - printf("%s (%i) key is pressed\n", key_name, key); + printf("'%s' (%i) key is pressed\n", key_name, key); if(action == GLFW_RELEASE) - printf("%s (%i) key is released\n", key_name, key); + printf("'%s' (%i) key is released\n", key_name, key); if(action == GLFW_RELEASE && key == GLFW_KEY_ENTER) PullInfo(); } @@ -331,6 +332,7 @@ void OnMouseWheel( int pos ){ void PullInfo(){ printf("================================================================================\n"); + int major, minor, rev; glfwGetVersion(&major, &minor, &rev); printf("GLFW version is %i.%i.%i\n", major, minor, rev); @@ -371,5 +373,15 @@ void PullInfo(){ for(i = 0; i