mesa: fix default buffer object access value
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 25 Sep 2008 17:46:27 +0000 (11:46 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 26 Sep 2008 13:31:42 +0000 (07:31 -0600)
src/mesa/main/bufferobj.c

index 6849135..190e6ab 100644 (file)
 #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.
  *
@@ -255,7 +262,7 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj,
    obj->RefCount = 1;
    obj->Name = name;
    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 );
    }
 
-   bufObj->Access = GL_READ_WRITE_ARB; /* initial value, OK? */
+   bufObj->Access = DEFAULT_ACCESS;
    bufObj->Pointer = NULL;
 
    return status;