Better depth_stencil/depth_component seperation

This commit is contained in:
rdb 2009-02-27 18:59:27 +00:00
parent 9faf063f4c
commit 17b0503778

View File

@ -266,7 +266,6 @@ rebuild_bitplanes() {
_textures[i]._rtm_mode = RTM_copy_texture; _textures[i]._rtm_mode = RTM_copy_texture;
continue; continue;
} }
// Assign the texture to this slot. // Assign the texture to this slot.
attach[plane] = tex; attach[plane] = tex;
} }
@ -465,7 +464,7 @@ bind_slot(bool rb_resize, Texture **attach, RenderTexturePlane slot, GLenum atta
// Allocate and bind the renderbuffer. // Allocate and bind the renderbuffer.
glgsg->_glBindRenderbuffer(GL_RENDERBUFFER_EXT, _rb[slot]); glgsg->_glBindRenderbuffer(GL_RENDERBUFFER_EXT, _rb[slot]);
if (attachpoint == GL_DEPTH_ATTACHMENT_EXT) { 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, glgsg->_glRenderbufferStorage(GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL_EXT,
_rb_size_x, _rb_size_y); _rb_size_x, _rb_size_y);
glgsg->_glBindRenderbuffer(GL_RENDERBUFFER_EXT, 0); glgsg->_glBindRenderbuffer(GL_RENDERBUFFER_EXT, 0);