Calculate haveAccumBuffer, haveDepthBuffer and haveStencilBuffer in
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 22 Mar 2005 13:16:20 +0000 (13:16 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 22 Mar 2005 13:16:20 +0000 (13:16 +0000)
driFillInModes().

src/mesa/drivers/dri/common/utils.c

index 85527f9234773d4a2123f253ca380686a871c678..1b82383dab5bcc80886b4abdd4be4730e79e3eaf 100644 (file)
@@ -593,6 +593,13 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
                    modes->swapMethod = db_modes[i];
                }
 
+               modes->haveAccumBuffer = ((modes->accumRedBits +
+                                          modes->accumGreenBits +
+                                          modes->accumBlueBits +
+                                          modes->accumAlphaBits) > 0);
+               modes->haveDepthBuffer = (modes->depthBits > 0);
+               modes->haveStencilBuffer = (modes->stencilBits > 0);
+
                modes = modes->next;
            }
        }