summaryrefslogtreecommitdiff
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-11-16 04:09:26 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-11-16 04:09:26 +0000
commit1a5f1bdb428ea3ded1e77796590014f89fe78f77 (patch)
treef0acd33352c709acb37c8b279a3251d3c46ebace /src/mesa/main/teximage.c
parent909e8a7abbce61de467e059d9be57a1f32a3d344 (diff)
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.
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c10
1 files changed, 4 insertions, 6 deletions
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);