diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/bufferobj.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 3678fba435..c68291ab91 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 ); |