[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Error catching with getBufferSubData



I feel like the argument that my proposal diverges from glGetBufferSubData is a significant one, even if that function hasn't made it's way to OpenGL ES (and possibly never will, at this point.) The fact that it is an existing OpenGL function means we should stick to it's definition where reasonable. As such I'm dropping the proposal unless someone else on the list feels strongly about it.

--Brandon

On Wed, Jun 17, 2015 at 1:02 AM Florian Bösch <pyalot@gmail.com> wrote:
On Wed, Jun 17, 2015 at 9:52 AM, Florian Bösch <pyalot@gmail.com> wrote:
  • GL_OUT_OF_MEMORY is generated if glMapBufferRange fails because memory for the mapping could not be obtained.
All of these errors indicate that your program is faulty.
That wasn't entirely correct, your program can be correct and you can still run into this error.

A case could be made that code like this:

if(!gl.mapBufferRange(...)){
  gl.getError();
}

Is a valid usecase of the boolean return value, because it only synchronizes (gl.getError()) if an error occured as opposed to:

gl.mapBufferRange(...);
gl.getError();