summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-12 09:17:23 -0700
committerBrian Paul <[email protected]>2012-01-12 09:58:45 -0700
commit36ede89687fe2de213f2637ab7acfb80cfd856cd (patch)
tree86280b042964a712d67f8deb96c21e07bbe36049 /src/mesa/main/framebuffer.c
parent185ee042ac4c6b08f7842b35d8234f2f8fab7831 (diff)
mesa: use _mesa_is_user_fbo() and _mesa_is_winsys_fbo() functions
Rather than testing the fbo's name against zero. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r--src/mesa/main/framebuffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 3ce395590da..7c3c4e3456c 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -281,8 +281,8 @@ _mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
* and return early.
*/
- /* For window system framebuffers, Name is zero */
- assert(fb->Name == 0);
+ /* Can only resize win-sys framebuffer objects */
+ assert(_mesa_is_winsys_fbo(fb));
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att = &fb->Attachment[i];
@@ -408,7 +408,7 @@ update_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb)
GLuint i;
/* user-created framebuffers only */
- assert(fb->Name);
+ assert(_mesa_is_user_fbo(fb));
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att = &fb->Attachment[i];
@@ -687,7 +687,7 @@ update_color_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
static void
update_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
{
- if (fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(fb)) {
/* This is a window-system framebuffer */
/* Need to update the FB's GL_DRAW_BUFFER state to match the
* context state (GL_READ_BUFFER too).