Skip to content

Commit 64abde8

Browse files
committed
Reduce startup flashbang by presenting early
1 parent 4803e40 commit 64abde8

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

engine/system/win/sys_video.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ int sys_video_c::Apply(sys_vidSet_s* set)
233233
}
234234
glfwMakeContextCurrent(wnd);
235235
gladLoadGLES2(glfwGetProcAddress);
236+
237+
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
238+
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
239+
glfwSwapBuffers(wnd);
240+
236241
glfwSetWindowUserPointer(wnd, sys);
237242
glfwSetCursorEnterCallback(wnd, [](GLFWwindow* wnd, int entered) {
238243
auto sys = (sys_main_c*)glfwGetWindowUserPointer(wnd);

0 commit comments

Comments
 (0)