mesa: fix default buffer object access value

This commit is contained in:
Brian Paul 2008-09-25 11:46:27 -06:00
parent e9c722b660
commit 6c72bc8089
1 changed files with 9 additions and 2 deletions

View File

@ -38,6 +38,13 @@
#include "bufferobj.h" #include "bufferobj.h"
#ifdef FEATURE_OES_mapbuffer
#define DEFAULT_ACCESS GL_WRITE_ONLY;
#else
#define DEFAULT_ACCESS GL_READ_WRITE;
#endif
/** /**
* Get the buffer object bound to the specified target in a GL context. * Get the buffer object bound to the specified target in a GL context.
* *
@ -255,7 +262,7 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj,
obj->RefCount = 1; obj->RefCount = 1;
obj->Name = name; obj->Name = name;
obj->Usage = GL_STATIC_DRAW_ARB; obj->Usage = GL_STATIC_DRAW_ARB;
obj->Access = GL_READ_WRITE_ARB; obj->Access = DEFAULT_ACCESS;
} }
@ -1065,7 +1072,7 @@ _mesa_UnmapBufferARB(GLenum target)
status = ctx->Driver.UnmapBuffer( ctx, target, bufObj ); status = ctx->Driver.UnmapBuffer( ctx, target, bufObj );
} }
bufObj->Access = GL_READ_WRITE_ARB; /* initial value, OK? */ bufObj->Access = DEFAULT_ACCESS;
bufObj->Pointer = NULL; bufObj->Pointer = NULL;
return status; return status;