PDA

View Full Version : Why there's no glMapSubBuffer ?



MickeyMouse
11-03-2010, 07:49 PM
The topic pretty much explains my question.

Without ability to map piece of buffer, we're constrained to always working with whole buffer (and if it's large, it can become unacceptable performance wise, so we use glBufferSubData). Fortunately, it's not an issue for textures (because we can use separate PBO objects there which can have any size we want). It is an issue for index and vertex buffers however.

Would there be any GL API or implementation related issues I'm not aware of if we had glMapSubBuffer (aka IDirect3D*Buffer*::Lock) defined as below?

void * glMapSubBuffer(GLenum target, GLenum access, GLintptr offset, GLsizeiptr size);

Alfonse Reinheart
11-03-2010, 10:29 PM
Because it's called "glMapBufferRange (http://www.opengl.org/wiki/Buffer_Object#Mapping)."

MickeyMouse
11-04-2010, 12:11 AM
Lol, thanks :) I wasn't looking anywhere above GL 2.1