summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-03-14 22:39:43 +0000
committerBrian Paul <[email protected]>2006-03-14 22:39:43 +0000
commit19b83221696f124bfe1fa7e72842c62c3f72ee43 (patch)
tree56605e4cec5e1f0e846996e8ad1dde33e8d5c4df
parent2a0d441ebb732496c2fd7d381bc19540803bbb77 (diff)
init Red/Green/EtcBits = 0 in soft_renderbuffer_storage()
-rw-r--r--src/mesa/main/renderbuffer.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 72a1220551a..1db5dce4fe4 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -2,7 +2,7 @@
* Mesa 3-D graphics library
* Version: 6.5
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -925,6 +925,15 @@ soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
{
GLuint pixelSize;
+ /* first clear these fields */
+ rb->RedBits =
+ rb->GreenBits =
+ rb->BlueBits =
+ rb->AlphaBits =
+ rb->IndexBits =
+ rb->DepthBits =
+ rb->StencilBits = 0;
+
switch (internalFormat) {
case GL_RGB:
case GL_R3_G3_B2: