mirror of
https://github.com/yshui/picom.git
synced 2024-11-11 13:51:02 -05:00
Use glDrawBuffer instead of glDrawBuffers in glx_blur_dst
glDrawBuffers doesn't take GL_BACK, which is what we are passing. And we are using only one buffer argument anyway, no need to use glDrawBuffers. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
635e66dcd1
commit
f18e862845
1 changed files with 2 additions and 4 deletions
|
@ -1102,11 +1102,10 @@ glx_blur_dst(session_t *ps, int dx, int dy, int width, int height, float z,
|
||||||
glBindTexture(tex_tgt, tex_scr);
|
glBindTexture(tex_tgt, tex_scr);
|
||||||
|
|
||||||
if (!last_pass) {
|
if (!last_pass) {
|
||||||
static const GLenum DRAWBUFS[2] = { GL_COLOR_ATTACHMENT0 };
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
|
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
|
||||||
GL_TEXTURE_2D, tex_scr2, 0);
|
GL_TEXTURE_2D, tex_scr2, 0);
|
||||||
glDrawBuffers(1, DRAWBUFS);
|
glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||||
if (glCheckFramebufferStatus(GL_FRAMEBUFFER)
|
if (glCheckFramebufferStatus(GL_FRAMEBUFFER)
|
||||||
!= GL_FRAMEBUFFER_COMPLETE) {
|
!= GL_FRAMEBUFFER_COMPLETE) {
|
||||||
log_error("Framebuffer attachment failed.");
|
log_error("Framebuffer attachment failed.");
|
||||||
|
@ -1114,9 +1113,8 @@ glx_blur_dst(session_t *ps, int dx, int dy, int width, int height, float z,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
static const GLenum DRAWBUFS[2] = { GL_BACK };
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||||
glDrawBuffers(1, DRAWBUFS);
|
glDrawBuffer(GL_BACK);
|
||||||
if (have_scissors)
|
if (have_scissors)
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
if (have_stencil)
|
if (have_stencil)
|
||||||
|
|
Loading…
Reference in a new issue