Removed glfwIsWindow.

This commit is contained in:
Camilla Berglund
2012-08-03 16:20:52 +02:00
parent 1736132bb2
commit 2972cdfeb1
21 changed files with 111 additions and 66 deletions
+14 -2
View File
@@ -10,6 +10,14 @@
#define GLFW_INCLUDE_GLU
#include <GL/glfw3.h>
static GLboolean running = GL_TRUE;
static int window_close_callback(GLFWwindow window)
{
running = GL_FALSE;
return GL_TRUE;
}
int main(void)
{
int width, height, x;
@@ -36,6 +44,8 @@ int main(void)
// Enable vertical sync (on cards that support it)
glfwSwapInterval(1);
glfwSetWindowCloseCallback(window_close_callback);
do
{
double t = glfwGetTime();
@@ -82,9 +92,11 @@ int main(void)
glfwSwapBuffers();
glfwPollEvents();
if (glfwGetKey(window, GLFW_KEY_ESCAPE))
running = GL_FALSE;
} // Check if the ESC key was pressed or the window was closed
while (glfwIsWindow(window) &&
glfwGetKey(window, GLFW_KEY_ESCAPE) != GLFW_PRESS);
while (running);
// Close OpenGL window and terminate GLFW
glfwTerminate();