mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Removed superfluous clear, added comment.
This commit is contained in:
parent
afcb2abbd4
commit
8dff22d9de
@ -114,6 +114,9 @@ int main(int argc, char** argv)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is the one and only time we create a texture
|
||||||
|
// It is created inside the first context created above
|
||||||
|
// It will then be shared with the second context created below
|
||||||
texture = create_texture();
|
texture = create_texture();
|
||||||
|
|
||||||
windows[1] = open_window("Second", windows[0]);
|
windows[1] = open_window("Second", windows[0]);
|
||||||
@ -126,12 +129,10 @@ int main(int argc, char** argv)
|
|||||||
while (glfwIsWindow(windows[0]) && glfwIsWindow(windows[1]))
|
while (glfwIsWindow(windows[0]) && glfwIsWindow(windows[1]))
|
||||||
{
|
{
|
||||||
glfwMakeWindowCurrent(windows[0]);
|
glfwMakeWindowCurrent(windows[0]);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
draw_quad(texture);
|
draw_quad(texture);
|
||||||
glfwSwapBuffers();
|
glfwSwapBuffers();
|
||||||
|
|
||||||
glfwMakeWindowCurrent(windows[1]);
|
glfwMakeWindowCurrent(windows[1]);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
draw_quad(texture);
|
draw_quad(texture);
|
||||||
glfwSwapBuffers();
|
glfwSwapBuffers();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user