[Mesa-dev] [PATCH] mesa: fix default_access_mode() result for ES2
Brian Paul
brianp at vmware.com
Wed Aug 1 09:51:01 PDT 2012
The GL_OES_mapbuffer extension is supported by OpenGL ES 1 and ES 2 so return
GL_MAP_WRITE_BIT for both ES versions, not just ES 1.
---
src/mesa/main/bufferobj.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index c7c21fb..912ba61 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -150,8 +150,10 @@ default_access_mode(const struct gl_context *ctx)
* The difference is because GL_OES_mapbuffer only supports mapping buffers
* write-only.
*/
- return (ctx->API == API_OPENGLES)
- ? GL_MAP_WRITE_BIT : (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT);
+ if (_mesa_is_gles(ctx))
+ return GL_MAP_WRITE_BIT;
+ else
+ return GL_MAP_WRITE_BIT | GL_MAP_READ_BIT;
}
--
1.7.3.4
More information about the mesa-dev
mailing list