From: Brian Paul Date: Tue, 14 Oct 2003 15:48:39 +0000 (+0000) Subject: bufObj->Access wasn't being set X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0bb281ba2184313eb211a230dc99697d0c064268;p=mesa.git bufObj->Access wasn't being set --- 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;