diff options
author | Éloi Rivard <azmeuk@gmail.com> | 2013-03-15 13:02:33 +0100 |
---|---|---|
committer | Éloi Rivard <azmeuk@gmail.com> | 2013-04-04 11:17:37 +0200 |
commit | c670dde7c62d1e0c2e69ca0720b1b11a3464beba (patch) | |
tree | 10ab24555f4a4d2a445ffdb02a9ba522a237fed2 | |
parent | 8d8191488ba8f2d8448f3ae46be51b444f2bf779 (diff) |
* OpenGL extensions.
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | tests/glfw/glfwsample.c | 20 |
2 files changed, 17 insertions, 4 deletions
@@ -58,3 +58,4 @@ a license to everyone to use it as detailed in LICENSE.) * Felix H. Dahlke <fhd@ubercode.de> * Éloi Rivard <azmeuk@gmail.com> +>>>>>>> * OpenGL extensions. diff --git a/tests/glfw/glfwsample.c b/tests/glfw/glfwsample.c index 771537c5..3d9be100 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<nb_params; i++) printf(" - %-27s : %i\n", GetParamName(params[i]), glfwGetWindowParam(params[i])); + const char* extension = "MOZ_WEBGL_compressed_texture_s3tc"; + printf("'%s' extension is %s.\n", extension, glfwExtensionSupported(extension) ? "supported" : "not supported"); + + extension = "GL_EXT_framebuffer_object"; + printf("'%s' extension is %s.\n", extension, glfwExtensionSupported(extension) ? "supported" : "not supported"); + + printf("Sleeping 1 sec...\n"); + glfwSleep(1); + printf("...Done.\n"); + printf("================================================================================\n"); } |