src/window.c

changeset 41
df81d493716e
parent 39
7cf310cc47cb
child 44
b3da4096c607
--- a/src/window.c	Thu Mar 21 20:48:18 2024 +0100
+++ b/src/window.c	Thu Mar 21 22:23:00 2024 +0100
@@ -116,6 +116,7 @@
         GLenum err = glewInit();
         if (err == GLEW_OK) {
             SDL_GL_SetSwapInterval(settings->vsync);
+            glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
             glEnable(GL_DEBUG_OUTPUT);
             glDebugMessageCallback(asc_gl_debug_callback, NULL);
 
@@ -183,10 +184,6 @@
         asc_window_activate(window);
     }
 
-    // Clear for new frame
-    glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
     // Draw the UI
     asc_scene_draw(&window->ui);
 

mercurial