17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 09:07:52 +01:00

opengl*renderer: Show an empty frame early (#233)

Gives a better feedback to the user that something has actually launched.
This commit is contained in:
Sebastian Krzyszkowiak
2026-11-07 12:33:22 +01:00
committed by GitHub
parent 088eeaa743
commit ecdef7f753
2 changed files with 8 additions and 0 deletions

View File

@@ -104,6 +104,10 @@ bool opengl33_renderer::Init(GLFWwindow *Window)
glDebugMessageCallback( ErrorCallback, 0 ); glDebugMessageCallback( ErrorCallback, 0 );
} }
glClearColor( 0.f, 0.f, 0.f, 1.f );
glClear( GL_COLOR_BUFFER_BIT );
glfwSwapBuffers( Window );
if (!Init_caps()) if (!Init_caps())
return false; return false;

View File

@@ -75,6 +75,10 @@ float const EU07_OPACITYDEFAULT { 0.5f };
bool bool
opengl_renderer::Init( GLFWwindow *Window ) { opengl_renderer::Init( GLFWwindow *Window ) {
glClearColor( 0.f, 0.f, 0.f, 1.f );
glClear( GL_COLOR_BUFFER_BIT );
glfwSwapBuffers( Window );
if( false == Init_caps() ) { return false; } if( false == Init_caps() ) { return false; }
m_window = Window; m_window = Window;