diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/bufferobj.c | 4 |
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; |