diff options
Diffstat (limited to 'src/mesa/main/bufferobj.h')
-rw-r--r-- | src/mesa/main/bufferobj.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index ef59ff83c8..decb44a65e 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -36,6 +36,26 @@ * Internal functions */ + +/** Is the given buffer object currently mapped? */ +static INLINE GLboolean +_mesa_bufferobj_mapped(const 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(const struct gl_buffer_object *obj) +{ + return obj->Name != 0; +} + + extern void _mesa_init_buffer_objects( GLcontext *ctx ); |