diff options
Diffstat (limited to 'src/libjin/Graphics/je_window.cpp')
-rw-r--r-- | src/libjin/Graphics/je_window.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libjin/Graphics/je_window.cpp b/src/libjin/Graphics/je_window.cpp index 7265898..86ccd29 100644 --- a/src/libjin/Graphics/je_window.cpp +++ b/src/libjin/Graphics/je_window.cpp @@ -70,15 +70,19 @@ namespace JinEngine return false; SDL_GL_SetSwapInterval(vsync ? 1 : 0); SDL_GL_MakeCurrent(mWnd, ctx); - // default configuration + // Default configuration gl.setClearColor(0, 0, 0, 0xff); - gl.pushColor(0xff, 0xff, 0xff, 0xff); + glClear(GL_COLOR_BUFFER_BIT); + gl.pushColor(0xff, 0xff, 0xff, 0xff); gl.enable(GL_BLEND); gl.enable(GL_TEXTURE_2D); gl.setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - // bind to default canvas + // Bind to default canvas Canvas::unbind(); Shader::unuse(); + // Avoid white blinnk. + swapBuffers(); + return true; } |