aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.h')
-rw-r--r--mesalib/src/mesa/main/fbobject.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/fbobject.h b/mesalib/src/mesa/main/fbobject.h
index 0a70a436d..3aee842f5 100644
--- a/mesalib/src/mesa/main/fbobject.h
+++ b/mesalib/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);