From bc6cced479b0ea854acff9f5fec253d462774290 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 4 Oct 2005 15:01:27 +0000 Subject: [PATCH] fix behaviour of glIsFrame/Renderbuffer() --- src/mesa/main/fbobject.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 07489f96205..324a3032535 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -509,10 +509,12 @@ _mesa_IsRenderbufferEXT(GLuint renderbuffer) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (renderbuffer && lookup_renderbuffer(ctx, renderbuffer)) - return GL_TRUE; - else - return GL_FALSE; + if (renderbuffer) { + struct gl_renderbuffer *rb = lookup_renderbuffer(ctx, renderbuffer); + if (rb != NULL && rb != &DummyRenderbuffer) + return GL_TRUE; + } + return GL_FALSE; } @@ -843,10 +845,12 @@ _mesa_IsFramebufferEXT(GLuint framebuffer) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (framebuffer && lookup_framebuffer(ctx, framebuffer)) - return GL_TRUE; - else - return GL_FALSE; + if (framebuffer) { + struct gl_framebuffer *rb = lookup_framebuffer(ctx, framebuffer); + if (rb != NULL && rb != &DummyFramebuffer) + return GL_TRUE; + } + return GL_FALSE; } -- 2.30.2