From 0bb281ba2184313eb211a230dc99697d0c064268 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 14 Oct 2003 15:48:39 +0000 Subject: [PATCH] bufObj->Access wasn't being set --- src/mesa/main/bufferobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.30.2