summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-12 15:42:51 -0600
committerBrian Paul <[email protected]>2009-08-12 17:28:45 -0600
commitbd4c6a2e503db43e81ef41f77d876308badd93eb (patch)
tree37a03bd869fe7eddb60fdcb671ef1cede3ca074f /src/mesa/vbo/vbo_exec_array.c
parent684049d97d423a5a873aefc5313d0c4b22528b95 (diff)
vbo: use _mesa_is_bufferobj()
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 2693ae62c2e..ddf6ca1e070 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -51,7 +51,7 @@ vbo_get_minmax_index(GLcontext *ctx,
GLsizei count = prim->count;
const void *indices;
- if (ib->obj->Name) {
+ if (_mesa_is_bufferobj(ib->obj)) {
const GLvoid *map = ctx->Driver.MapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,
GL_READ_ONLY,
@@ -103,7 +103,7 @@ vbo_get_minmax_index(GLcontext *ctx,
break;
}
- if (ib->obj->Name != 0) {
+ if (_mesa_is_bufferobj(ib->obj)) {
ctx->Driver.UnmapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,
ib->obj);
@@ -121,7 +121,7 @@ check_array_data(GLcontext *ctx, struct gl_client_array *array,
{
if (array->Enabled) {
const void *data = array->Ptr;
- if (array->BufferObj->Name) {
+ if (_mesa_is_bufferobj(array->BufferObj)) {
if (!array->BufferObj->Pointer) {
/* need to map now */
array->BufferObj->Pointer = ctx->Driver.MapBuffer(ctx,
@@ -166,8 +166,8 @@ static void
unmap_array_buffer(GLcontext *ctx, struct gl_client_array *array)
{
if (array->Enabled &&
- array->BufferObj->Name &&
- array->BufferObj->Pointer) {
+ _mesa_is_bufferobj(array->BufferObj) &&
+ _mesa_bufferobj_mapped(array->BufferObj)) {
ctx->Driver.UnmapBuffer(ctx,
GL_ARRAY_BUFFER_ARB,
array->BufferObj);
@@ -186,7 +186,7 @@ check_draw_elements_data(GLcontext *ctx, GLsizei count, GLenum elemType,
const void *elemMap;
GLint i, k;
- if (ctx->Array.ElementArrayBufferObj->Name) {
+ if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj)) {
elemMap = ctx->Driver.MapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,
GL_READ_ONLY,
@@ -225,7 +225,7 @@ check_draw_elements_data(GLcontext *ctx, GLsizei count, GLenum elemType,
}
}
- if (ctx->Array.ElementArrayBufferObj->Name) {
+ if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj)) {
ctx->Driver.UnmapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,
ctx->Array.ElementArrayBufferObj);