If glBufferDataARB() is called while a buffer object is currently mapped
we're supposed to unmap the current buffer, then replace it. Don't generate
an error.
}
if (bufObj->Pointer) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glBufferDataARB(buffer is mapped)" );
- return;
+ /* Unmap the existing buffer. We'll replace it now. Not an error. */
+ ctx->Driver.UnmapBuffer(ctx, target, bufObj);
+ bufObj->Access = DEFAULT_ACCESS;
+ bufObj->Pointer = NULL;
}
ASSERT(ctx->Driver.BufferData);