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
@@ -113,7 +113,7 @@ int main(void)
glVertex2f((GLfloat) cursor_x, (GLfloat) window_height);
glEnd();
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
}
+1 -1
View File
@@ -143,7 +143,7 @@ int main(int argc, char** argv)
glColor3f(0.8f, 0.2f, 0.4f);
glRectf(-0.5f, -0.5f, 0.5f, 0.5f);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwWaitEvents();
}
+1 -1
View File
@@ -239,7 +239,7 @@ static void window_refresh_callback(GLFWwindow window)
printf("%08x at %0.3f: Window refresh\n", counter++, glfwGetTime());
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
glfwSwapBuffers(window);
}
static void window_focus_callback(GLFWwindow window, int activated)
+1 -1
View File
@@ -147,7 +147,7 @@ int main(int argc, char** argv)
glEnable(GL_MULTISAMPLE_ARB);
glRectf(-0.15f, -0.15f, 0.15f, 0.15f);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
}
+1 -1
View File
@@ -101,7 +101,7 @@ int main(void)
while (running)
{
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwWaitEvents();
}
+1 -1
View File
@@ -158,7 +158,7 @@ int main(int argc, char** argv)
glColor3f(0.8f, 0.2f, 0.4f);
glRectf(-0.5f, -0.5f, 0.5f, 0.5f);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
}
+1 -1
View File
@@ -152,7 +152,7 @@ int main(int argc, char** argv)
glClearColor(1, 1, 1, 0);
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
}
+1 -1
View File
@@ -205,7 +205,7 @@ int main(void)
refresh_joysticks();
draw_joysticks();
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
}
+1 -1
View File
@@ -148,7 +148,7 @@ static void test_modes(void)
while (glfwGetTime() < 5.0)
{
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
if (!window)
+1 -1
View File
@@ -131,7 +131,7 @@ int main(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
glfwSwapBuffers(window_handle);
glfwWaitEvents();
}
+1 -1
View File
@@ -147,7 +147,7 @@ int main(int argc, char** argv)
glRectf(-0.5f, -0.5f, 1.f, 1.f);
glPopMatrix();
glfwSwapBuffers();
glfwSwapBuffers(window_handle);
glfwPollEvents();
if (closed)
+3 -2
View File
@@ -172,11 +172,12 @@ int main(int argc, char** argv)
{
glfwMakeContextCurrent(windows[0]);
draw_quad(texture);
glfwSwapBuffers();
glfwMakeContextCurrent(windows[1]);
draw_quad(texture);
glfwSwapBuffers();
glfwSwapBuffers(windows[0]);
glfwSwapBuffers(windows[1]);
glfwWaitEvents();
}
+1 -1
View File
@@ -97,7 +97,7 @@ int main(void)
position = cosf(glfwGetTime() * 4.f) * 0.75f;
glRectf(position - 0.25f, -1.f, position + 0.25f, 1.f);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwPollEvents();
}
+1 -1
View File
@@ -61,7 +61,7 @@ int main(void)
while (glfwGetCurrentContext())
{
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
glfwSwapBuffers(window);
glfwWaitEvents();
}
+1 -1
View File
@@ -87,7 +87,7 @@ int main(void)
{
glfwMakeContextCurrent(windows[i]);
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers();
glfwSwapBuffers(windows[i]);
}
glfwPollEvents();