From 1a5f1bdb428ea3ded1e77796590014f89fe78f77 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 16 Nov 2005 04:09:26 +0000 Subject: Use new gl_framebuffer _Depth/_StencilBuffer fields instead of Attachment[BUFFER_DEPTH/STENCIL].Renderbuffer. The former may be wrappers around combined depth/stencil renderbuffers attached at the later points. --- src/mesa/main/teximage.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/mesa/main/teximage.c') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 419df0f090..cb0e1884d7 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1792,7 +1792,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, } else if (is_depth_format(internalFormat)) { /* make sure we have depth/stencil buffers */ - if (!ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer) { + if (!ctx->ReadBuffer->_DepthBuffer) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexImage%D(no depth)", dimensions); return GL_TRUE; @@ -1800,8 +1800,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, } else if (is_depthstencil_format(internalFormat)) { /* make sure we have depth/stencil buffers */ - if (!ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer || - !ctx->ReadBuffer->Attachment[BUFFER_STENCIL].Renderbuffer) { + if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexImage%D(no depth/stencil buffer)", dimensions); return GL_TRUE; @@ -1969,7 +1968,7 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, } if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) { - if (!ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer) { + if (!ctx->ReadBuffer->_DepthBuffer) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexSubImage%D(no depth buffer)", dimensions); @@ -1977,8 +1976,7 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions, } } else if (teximage->_BaseFormat == GL_DEPTH_STENCIL_EXT) { - if (!ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Renderbuffer || - !ctx->ReadBuffer->Attachment[BUFFER_STENCIL].Renderbuffer) { + if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexSubImage%D(no depth/stencil buffer)", dimensions); -- cgit v1.2.3