From 3dfbd71a6eb21615d98bca088c702e426f4d7439 Mon Sep 17 00:00:00 2001 From: NoHandsMate Date: Sat, 24 Apr 2021 18:40:54 +0200 Subject: [PATCH] Added glClear() to avoid *really* scary screen flickering --- src/1.getting_started/1.1.hello_window/hello_window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/1.getting_started/1.1.hello_window/hello_window.cpp b/src/1.getting_started/1.1.hello_window/hello_window.cpp index 695236f6d..f2335ae6d 100644 --- a/src/1.getting_started/1.1.hello_window/hello_window.cpp +++ b/src/1.getting_started/1.1.hello_window/hello_window.cpp @@ -53,7 +53,8 @@ int main() // glfw: swap buffers and poll IO events (keys pressed/released, mouse moved etc.) // ------------------------------------------------------------------------------- - glfwSwapBuffers(window); + glClear(GL_COLOR_BUFFER_BIT); + glfwSwapBuffers(window); glfwPollEvents(); }