diff options
author | Brian Paul <[email protected]> | 2012-01-12 09:17:23 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-12 09:58:45 -0700 |
commit | 36ede89687fe2de213f2637ab7acfb80cfd856cd (patch) | |
tree | 86280b042964a712d67f8deb96c21e07bbe36049 /src/mesa/main/fbobject.h | |
parent | 185ee042ac4c6b08f7842b35d8234f2f8fab7831 (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/fbobject.h')
-rw-r--r-- | src/mesa/main/fbobject.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 0a70a436dea..3aee842f5a4 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -32,6 +32,28 @@ struct gl_context; struct gl_texture_object; + +/** + * Is the given FBO a user-created FBO? + */ +static inline GLboolean +_mesa_is_user_fbo(const struct gl_framebuffer *fb) +{ + return fb->Name != 0; +} + + +/** + * Is the given FBO a window system FBO (like an X window)? + */ +static inline GLboolean +_mesa_is_winsys_fbo(const struct gl_framebuffer *fb) +{ + return fb->Name == 0; +} + + + extern void _mesa_init_fbobjects(struct gl_context *ctx); |