epoxy_has_gl_extension("GL_MESA_pack_invert");
glamor_priv->has_fbo_blit =
epoxy_has_gl_extension("GL_EXT_framebuffer_blit");
+ glamor_priv->has_map_buffer_range =
+ epoxy_has_gl_extension("GL_ARB_map_buffer_range");
glamor_priv->has_buffer_storage =
epoxy_has_gl_extension("GL_ARB_buffer_storage");
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &glamor_priv->max_fbo_size);
*vbo_offset = (void *)(uintptr_t)glamor_priv->vbo_offset;
data = glamor_priv->vb + glamor_priv->vbo_offset;
glamor_priv->vbo_offset += size;
- } else if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+ } else if (glamor_priv->has_map_buffer_range) {
if (glamor_priv->vbo_size < glamor_priv->vbo_offset + size) {
glamor_priv->vbo_size = MAX(GLAMOR_VBO_SIZE, size);
glamor_priv->vbo_offset = 0;
* persistent mapping, so we can leave it around until we
* reach the end of the buffer.
*/
- } else if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+ } else if (glamor_priv->has_map_buffer_range) {
glUnmapBuffer(GL_ARRAY_BUFFER);
} else {
glBufferData(GL_ARRAY_BUFFER, glamor_priv->vbo_offset,
glamor_get_context(glamor_priv);
glDeleteBuffers(1, &glamor_priv->vbo);
- if (glamor_priv->gl_flavor != GLAMOR_GL_DESKTOP)
+ if (!glamor_priv->has_map_buffer_range)
free(glamor_priv->vb);
glamor_put_context(glamor_priv);