summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-09-25 11:46:27 -0600
committerBrian Paul <[email protected]>2008-09-25 11:46:27 -0600
commit1ca512c643553bd3504abd258ab80b7a550ab292 (patch)
tree4b6f41e2611a64fd894ae76367510ad8cfd72c30
parent8701e5f702a0b15d44395268e2422c196d8f4efd (diff)
mesa: fix default buffer object access value
-rw-r--r--src/mesa/main/bufferobj.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index ecdb4d219c8..dd4ac4679e2 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -38,6 +38,13 @@
#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;
}
@@ -1037,7 +1044,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;