aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-10-14 15:48:39 +0000
committerBrian Paul <[email protected]>2003-10-14 15:48:39 +0000
commit0bb281ba2184313eb211a230dc99697d0c064268 (patch)
tree6d52700ee841782eab96aec963595ecb53f76da9 /src/mesa/main/bufferobj.c
parent0219d1168e14efc3277822f64aa3d822b7bf5bba (diff)
bufObj->Access wasn't being set
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 93a3066bf69..8cf2fdf024b 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -699,6 +699,8 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glMapBufferARB(access)");
}
+ bufObj->Access = access;
+
return bufObj->Pointer;
}
@@ -711,7 +713,6 @@ _mesa_UnmapBufferARB(GLenum target)
GLboolean status = GL_TRUE;
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
-
bufObj = buffer_object_get_target( ctx, target, "UnmapBufferARB" );
if ( bufObj == NULL ) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glUnmapBufferARB" );
@@ -727,6 +728,7 @@ _mesa_UnmapBufferARB(GLenum target)
status = (*ctx->Driver.UnmapBuffer)( ctx, target, bufObj );
}
+ bufObj->Access = GL_READ_WRITE_ARB; /* initial value, OK? */
bufObj->Pointer = NULL;
return status;