summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/bufferobj.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 3678fba435e..c68291ab919 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -44,6 +44,18 @@ _mesa_bufferobj_mapped(struct gl_buffer_object *obj)
return obj->Pointer != NULL;
}
+/**
+ * Is the given buffer object a user-created buffer object?
+ * Mesa uses default buffer objects in several places. Default buffers
+ * always have Name==0. User created buffers have Name!=0.
+ */
+static INLINE GLboolean
+_mesa_is_bufferobj(struct gl_buffer_object *obj)
+{
+ return obj->Name != 0;
+}
+
+
extern void
_mesa_init_buffer_objects( GLcontext *ctx );