diff options
author | Brian Paul <[email protected]> | 2009-08-12 15:42:51 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-12 17:28:45 -0600 |
commit | bd4c6a2e503db43e81ef41f77d876308badd93eb (patch) | |
tree | 37a03bd869fe7eddb60fdcb671ef1cede3ca074f /src/mesa/vbo/vbo_exec_draw.c | |
parent | 684049d97d423a5a873aefc5313d0c4b22528b95 (diff) |
vbo: use _mesa_is_bufferobj()
Diffstat (limited to 'src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index a988424d212..d76c45f3560 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -214,7 +214,7 @@ vbo_exec_bind_arrays( GLcontext *ctx ) /* override the default array set above */ exec->vtx.inputs[attr] = &arrays[attr]; - if (exec->vtx.bufferobj->Name) { + if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { /* a real buffer obj: Ptr is an offset, not a pointer*/ GLsizeiptr offset; assert(exec->vtx.bufferobj->Pointer); /* buf should be mapped */ @@ -251,7 +251,7 @@ vbo_exec_vtx_unmap( struct vbo_exec_context *exec ) { GLenum target = GL_ARRAY_BUFFER_ARB; - if (exec->vtx.bufferobj->Name) { + if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { GLcontext *ctx = exec->ctx; if (ctx->Driver.FlushMappedBufferRange) { @@ -291,7 +291,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec ) MESA_MAP_NOWAIT_BIT; const GLenum usage = GL_STREAM_DRAW_ARB; - if (exec->vtx.bufferobj->Name == 0) + if (!_mesa_is_bufferobj(exec->vtx.bufferobj)) return; if (exec->vtx.buffer_map != NULL) { @@ -365,7 +365,7 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) if (ctx->NewState) _mesa_update_state( ctx ); - if (exec->vtx.bufferobj->Name) { + if (_mesa_is_bufferobj(exec->vtx.bufferobj)) { vbo_exec_vtx_unmap( exec ); } @@ -384,7 +384,7 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) /* If using a real VBO, get new storage -- unless asked not to. */ - if (exec->vtx.bufferobj->Name && !unmap) { + if (_mesa_is_bufferobj(exec->vtx.bufferobj) && !unmap) { vbo_exec_vtx_map( exec ); } } @@ -393,7 +393,7 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) /* May have to unmap explicitly if we didn't draw: */ if (unmap && - exec->vtx.bufferobj->Name && + _mesa_is_bufferobj(exec->vtx.bufferobj) && exec->vtx.buffer_map) { vbo_exec_vtx_unmap( exec ); } |