bufObj->Access wasn't being set
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 14 Oct 2003 15:48:39 +0000 (15:48 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 14 Oct 2003 15:48:39 +0000 (15:48 +0000)
src/mesa/main/bufferobj.c

index 93a3066bf69c81a8fef94f80ccfd277780133825..8cf2fdf024b7a4ab4a2c65a4ad399ceeb7cb17f6 100644 (file)
@@ -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;