summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-11-16 04:17:20 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-11-16 04:17:20 +0000
commit0f29ef6092b77a5047c92520bb8e773ef44bca7c (patch)
tree09e59ea2beda0a5253a954d3c1dd1e3dcf33c93f /src/mesa
parent94f70fab64038ea2105098496de8e50223d69dab (diff)
additional comments about GL_DEPTH_STENCIL buffers
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/framebuffer.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 4fef9066c8..17241cfcef 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -444,9 +444,12 @@ set_stencil_renderbuffer(struct gl_framebuffer *fb,
* _ColorDrawBuffers
* _NumColorDrawBuffers
* _ColorReadBuffer
+ * _DepthBuffer
+ * _StencilBuffer
* If the current framebuffer is user-created, make sure it's complete.
* The following functions can effect this state: glReadBuffer,
- * glDrawBuffer, glDrawBuffersARB, glFramebufferRenderbufferEXT.
+ * glDrawBuffer, glDrawBuffersARB, glFramebufferRenderbufferEXT,
+ * glRenderbufferStorageEXT.
*/
void
_mesa_update_framebuffer(GLcontext *ctx)
@@ -504,7 +507,9 @@ _mesa_update_framebuffer(GLcontext *ctx)
/*
* Deal with GL_DEPTH_STENCIL renderbuffer(s) attached to the depth
- * and/or stencil attachment points.
+ * and/or stencil attachment points. If either of the DEPTH or STENCIL
+ * renderbuffer attachments are GL_DEPTH_STENCIL buffers, we need to set
+ * up depth/stencil renderbuffer wrappers.
*/
{
struct gl_renderbuffer *depthRb
@@ -513,6 +518,7 @@ _mesa_update_framebuffer(GLcontext *ctx)
= fb->Attachment[BUFFER_STENCIL].Renderbuffer;
if (depthRb && depthRb->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* The attached depth buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_DepthBuffer || fb->_DepthBuffer->Wrapped != depthRb) {
/* need to update wrapper */
struct gl_renderbuffer *wrapper
@@ -527,6 +533,7 @@ _mesa_update_framebuffer(GLcontext *ctx)
}
if (stencilRb && stencilRb->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* The attached stencil buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_StencilBuffer || fb->_StencilBuffer->Wrapped != stencilRb) {
/* need to update wrapper */
struct gl_renderbuffer *wrapper