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
4e14eec2ba
commit
1627a91c76
|
@ -1043,11 +1043,10 @@ glx_blur_dst(session_t *ps, int dx, int dy, int width, int height, float z,
|
|||
glBindTexture(tex_tgt, tex_scr);
|
||||
|
||||
if (!last_pass) {
|
||||
static const GLenum DRAWBUFS[2] = { GL_COLOR_ATTACHMENT0 };
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
|
||||
GL_TEXTURE_2D, tex_scr2, 0);
|
||||
glDrawBuffers(1, DRAWBUFS);
|
||||
glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||
if (glCheckFramebufferStatus(GL_FRAMEBUFFER)
|
||||
!= GL_FRAMEBUFFER_COMPLETE) {
|
||||
log_error("Framebuffer attachment failed.");
|
||||
|
@ -1055,9 +1054,8 @@ glx_blur_dst(session_t *ps, int dx, int dy, int width, int height, float z,
|
|||
}
|
||||
}
|
||||
else {
|
||||
static const GLenum DRAWBUFS[2] = { GL_BACK };
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glDrawBuffers(1, DRAWBUFS);
|
||||
glDrawBuffer(GL_BACK);
|
||||
if (have_scissors)
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
if (have_stencil)
|
||||
|
|
Loading…
Reference in New Issue