From 17b0503778e11394c9dd857491e6dffa9c7c5188 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 27 Feb 2009 18:59:27 +0000 Subject: [PATCH] Better depth_stencil/depth_component seperation --- panda/src/glstuff/glGraphicsBuffer_src.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index bcf498feee..0c6838fef8 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -266,7 +266,6 @@ rebuild_bitplanes() { _textures[i]._rtm_mode = RTM_copy_texture; continue; } - // Assign the texture to this slot. attach[plane] = tex; } @@ -465,7 +464,7 @@ bind_slot(bool rb_resize, Texture **attach, RenderTexturePlane slot, GLenum atta // Allocate and bind the renderbuffer. glgsg->_glBindRenderbuffer(GL_RENDERBUFFER_EXT, _rb[slot]); if (attachpoint == GL_DEPTH_ATTACHMENT_EXT) { - if (_gsg->get_supports_depth_stencil()) { + if (_gsg->get_supports_depth_stencil() && slot == RTP_depth_stencil) { glgsg->_glRenderbufferStorage(GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL_EXT, _rb_size_x, _rb_size_y); glgsg->_glBindRenderbuffer(GL_RENDERBUFFER_EXT, 0);