Skip to content

Commit eda8c65

Browse files
committed
Get rid of OpenGL warnings about the framebuffer being unsupported.
At least on NVidia drivers, the medium-severity warning "Framebuffer unsupported. Framebuffer object Scene framebuffer is unsupported because the depth and stencil attachments are mismatched." would get repeatedly output to the debug log. @SamuelCho suggested this change, which gets rid of the warnings and doesn't appear to have introduced any graphical glitches. Fixes #1382.
1 parent 186f8ff commit eda8c65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/graphics/opengl/gropengldraw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2198,8 +2198,8 @@ void gr_opengl_deferred_lighting_finish()
21982198
}
21992199

22002200
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, Scene_color_texture, 0);
2201+
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
22012202
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, Scene_depth_texture, 0);
2202-
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0);
22032203

22042204
gr_end_view_matrix();
22052205
gr_end_proj_matrix();

0 commit comments

Comments
 (0)