Merge pull request #70 from lvonasek/feature_opengl_fixes

Do not bind FBO texture as renderbuffer
This commit is contained in:
Simon 2022-04-28 23:07:00 +01:00 committed by GitHub
commit decc2d0267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1770,12 +1770,8 @@ const void* RB_HUDBuffer( const void* data ) {
qglBindRenderbuffer(GL_RENDERBUFFER, 0); qglBindRenderbuffer(GL_RENDERBUFFER, 0);
qglFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, qglFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
tr.hudImage->texnum, 0); tr.hudImage->texnum, 0);
qglFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D,
// Attach combined depth+stencil tr.hudDepthImage->texnum, 0);
qglFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER,
tr.hudDepthImage->texnum);
qglFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER,
tr.hudDepthImage->texnum);
GLenum result = qglCheckFramebufferStatus(GL_FRAMEBUFFER); GLenum result = qglCheckFramebufferStatus(GL_FRAMEBUFFER);
if (result != GL_FRAMEBUFFER_COMPLETE) if (result != GL_FRAMEBUFFER_COMPLETE)