diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-12-27 21:02:43 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-12-27 21:02:43 +0100 |
commit | 0d5743ae8a077c284c0cad2e3f9dc52c6eed0a40 (patch) | |
tree | f0be64f3046b33f1d87648da369b469e8dff1a5b /src/window/window.c | |
parent | 26aa794b4260afcac0d4a9377c0218e474b051df (diff) |
Diffstat (limited to 'src/window/window.c')
-rw-r--r-- | src/window/window.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/window/window.c b/src/window/window.c index dd91110..d931a9f 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -1017,7 +1017,7 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window context->gl.glEnable(GL_TEXTURE_2D); context->gl.glEnable(GL_BLEND); context->gl.glEnable(GL_SCISSOR_TEST); - mgl_window_set_render_blend_func(self); + context->gl.glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); context->gl.glEnableClientState(GL_VERTEX_ARRAY); context->gl.glEnableClientState(GL_TEXTURE_COORD_ARRAY); context->gl.glEnableClientState(GL_COLOR_ARRAY); @@ -2120,17 +2120,6 @@ void mgl_window_set_key_repeat_enabled(mgl_window *self, bool enabled) { self->key_repeat_enabled = enabled; } -void mgl_window_set_texture_blend_func(mgl_window *self) { - mgl_context *context = mgl_get_context(); - context->gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -} - -void mgl_window_set_render_blend_func(mgl_window *self) { - mgl_context *context = mgl_get_context(); - x11_context *x11_context = self->context; - context->gl.glBlendFunc(x11_context->support_alpha ? GL_ONE : GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); -} - void mgl_window_flush(mgl_window *self) { mgl_context *context = mgl_get_context(); XFlush(context->connection); |