mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
render/gles2: query alpha size from render buffer
If we're using a render buffer, query the alpha size from it. Closes: https://github.com/swaywm/wlroots/issues/2527
This commit is contained in:
parent
be8403e73d
commit
f91e89fd9f
1 changed files with 6 additions and 1 deletions
|
@ -453,7 +453,12 @@ static enum wl_shm_format gles2_preferred_read_format(
|
|||
pop_gles2_debug(renderer);
|
||||
|
||||
EGLint alpha_size = -1;
|
||||
if (renderer->egl->config != EGL_NO_CONFIG_KHR) {
|
||||
if (renderer->current_buffer != NULL) {
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, renderer->current_buffer->rbo);
|
||||
glGetRenderbufferParameteriv(GL_RENDERBUFFER,
|
||||
GL_RENDERBUFFER_ALPHA_SIZE, &alpha_size);
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, 0);
|
||||
} else if (renderer->egl->config != EGL_NO_CONFIG_KHR) {
|
||||
eglGetConfigAttrib(renderer->egl->display, renderer->egl->config,
|
||||
EGL_ALPHA_SIZE, &alpha_size);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue