summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-09-28 02:28:42 +0000
committerBrian Paul <[email protected]>2005-09-28 02:28:42 +0000
commitb955474093445d6e5b8c5d3cfa69e2752a01bcf8 (patch)
treedca35662b4e68a887d51f278496087c70dcf47d6 /src
parent1b5d3d647e3abe89b11f6ac9ba66327050d0750e (diff)
change initialization of rb->DepthBits
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/renderbuffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 4a0a63c56f4..cc1b4fe3763 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1045,7 +1045,7 @@ soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_ushort;
rb->PutValues = put_values_ushort;
rb->PutMonoValues = put_mono_values_ushort;
- rb->DepthBits = 8 * sizeof(GLushort);
+ /*rb->DepthBits not set here */
pixelSize = sizeof(GLushort);
break;
case GL_DEPTH_COMPONENT24:
@@ -1060,7 +1060,7 @@ soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->PutMonoRow = put_mono_row_uint;
rb->PutValues = put_values_uint;
rb->PutMonoValues = put_mono_values_uint;
- rb->DepthBits = 8 * sizeof(GLuint);
+ /* rb->DepthBits not set here */
pixelSize = sizeof(GLuint);
break;
case GL_COLOR_INDEX8_EXT:
@@ -1140,6 +1140,7 @@ soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
}
+
/**********************************************************************/
/**********************************************************************/
/**********************************************************************/
@@ -1713,6 +1714,7 @@ _mesa_add_depth_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
else {
rb->InternalFormat = GL_DEPTH_COMPONENT32;
}
+ rb->DepthBits = depthBits;
rb->AllocStorage = soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, rb);