diff options
author | chai <chaifix@163.com> | 2018-11-25 00:11:28 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-25 00:11:28 +0800 |
commit | e8e12b11db220160eb63727fb03548410bf3afd2 (patch) | |
tree | a36d62b783e97af9047469955b1aa0ddae6b4627 /src/libjin/graphics/je_window.cpp | |
parent | 42421575d2e17b5c57ff0034c037b651bd6d1119 (diff) |
*misc
Diffstat (limited to 'src/libjin/graphics/je_window.cpp')
-rw-r--r-- | src/libjin/graphics/je_window.cpp | 9 |
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() |