GLES: Support glMapBufferRange from ES3
ES3 provides glMapBufferRange as core, with the added bonus that it also supports read mappings. Use this where possible. Signed-off-by: Daniel Stone <daniels@collabora.com> https://bugzilla.gnome.org/show_bug.cgi?id=728355
This commit is contained in:
parent
d6f415d491
commit
5253264f2f
@ -404,6 +404,17 @@ _cogl_driver_update_features (CoglContext *context,
|
|||||||
COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE, TRUE);
|
COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context->glMapBufferRange)
|
||||||
|
{
|
||||||
|
/* MapBufferRange in ES3+ does support mapping for read */
|
||||||
|
flags |= (COGL_FEATURE_MAP_BUFFER_FOR_WRITE |
|
||||||
|
COGL_FEATURE_MAP_BUFFER_FOR_READ);
|
||||||
|
COGL_FLAGS_SET(context->features,
|
||||||
|
COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE, TRUE);
|
||||||
|
COGL_FLAGS_SET(context->features,
|
||||||
|
COGL_FEATURE_ID_MAP_BUFFER_FOR_READ, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
if (context->glEGLImageTargetTexture2D)
|
if (context->glEGLImageTargetTexture2D)
|
||||||
COGL_FLAGS_SET (private_features,
|
COGL_FLAGS_SET (private_features,
|
||||||
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE, TRUE);
|
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE, TRUE);
|
||||||
|
@ -295,7 +295,7 @@ COGL_EXT_FUNCTION (void, glGenVertexArrays,
|
|||||||
COGL_EXT_END ()
|
COGL_EXT_END ()
|
||||||
|
|
||||||
COGL_EXT_BEGIN (map_region, 3, 0,
|
COGL_EXT_BEGIN (map_region, 3, 0,
|
||||||
0, /* not in either GLES */
|
COGL_EXT_IN_GLES3,
|
||||||
"ARB:\0",
|
"ARB:\0",
|
||||||
"map_buffer_range\0")
|
"map_buffer_range\0")
|
||||||
COGL_EXT_FUNCTION (GLvoid *, glMapBufferRange,
|
COGL_EXT_FUNCTION (GLvoid *, glMapBufferRange,
|
||||||
|
Loading…
Reference in New Issue
Block a user