From 8dff22d9de002239f6abd0f1aafc0994d00c4e70 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 4 Oct 2010 19:35:28 +0200 Subject: [PATCH] Removed superfluous clear, added comment. --- tests/sharing.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/sharing.c b/tests/sharing.c index 765b4ec2..ea451a3b 100644 --- a/tests/sharing.c +++ b/tests/sharing.c @@ -114,6 +114,9 @@ int main(int argc, char** argv) 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(); windows[1] = open_window("Second", windows[0]); @@ -126,12 +129,10 @@ int main(int argc, char** argv) while (glfwIsWindow(windows[0]) && glfwIsWindow(windows[1])) { glfwMakeWindowCurrent(windows[0]); - glClear(GL_COLOR_BUFFER_BIT); draw_quad(texture); glfwSwapBuffers(); glfwMakeWindowCurrent(windows[1]); - glClear(GL_COLOR_BUFFER_BIT); draw_quad(texture); glfwSwapBuffers();