aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/je_window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/graphics/je_window.cpp')
-rw-r--r--src/libjin/graphics/je_window.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libjin/graphics/je_window.cpp b/src/libjin/graphics/je_window.cpp
index c14d290..f08e816 100644
--- a/src/libjin/graphics/je_window.cpp
+++ b/src/libjin/graphics/je_window.cpp
@@ -86,20 +86,21 @@ 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);
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
+ // Default blend function.
+ gl.setBlendMode(OpenGL::BlendMode::ALPHA);
+ // Bind to default canvas.
Canvas::unbind();
Shader::unuse();
// Avoid white blinnk.
swapBuffers();
- return true;
+ return true;
}
void Window::quitSystem()