Added window parameter to glfwSwapBuffers.

This commit is contained in:
Camilla Berglund
2012-08-06 18:13:37 +02:00
parent aff30d0baa
commit 585a840329
29 changed files with 37 additions and 44 deletions
+1 -1
View File
@@ -617,7 +617,7 @@ int main( void )
display();
/* Swap buffers */
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
/* Check if we are still running */
+1 -1
View File
@@ -368,7 +368,7 @@ int main(int argc, char *argv[])
animate();
// Swap buffers
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
}
+1 -1
View File
@@ -663,7 +663,7 @@ int main(int argc, char** argv)
glDrawElements(GL_LINES, 2* MAP_NUM_LINES , GL_UNSIGNED_INT, 0);
/* display and process events through callbacks */
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
/* Check the frame rate and update the heightmap if needed */
dt = glfwGetTime();
+1 -1
View File
@@ -500,7 +500,7 @@ int main(void)
drawAllViews();
// Swap buffers
glfwSwapBuffers();
glfwSwapBuffers(window);
do_redraw = 0;
}
+1 -1
View File
@@ -89,7 +89,7 @@ int main(void)
glEnd();
// Swap buffers
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
if (glfwGetKey(window, GLFW_KEY_ESCAPE))
+3 -3
View File
@@ -145,7 +145,7 @@ void init_grid(void)
// Draw scene
//========================================================================
void draw_scene(void)
void draw_scene(GLFWwindow window)
{
// Clear the color and depth buffers
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -162,7 +162,7 @@ void draw_scene(void)
glDrawElements(GL_QUADS, 4 * QUADNUM, GL_UNSIGNED_INT, quad);
glfwSwapBuffers();
glfwSwapBuffers(window);
}
@@ -450,7 +450,7 @@ int main(int argc, char* argv[])
adjust_grid();
// Draw wave grid to OpenGL display
draw_scene();
draw_scene(window);
glfwPollEvents();
}