return;
}
- bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (buffer == 0) {
+ bufObj = ctx->Shared->NullBufferObj;
+ } else {
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ }
+
if (!bufObj) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBindBufferRange(invalid buffer=%u)", buffer);
return;
}
- bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (buffer == 0) {
+ bufObj = ctx->Shared->NullBufferObj;
+ } else {
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ }
+
if (!bufObj) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBindBufferBase(invalid buffer=%u)", buffer);
return;
}
- bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (buffer == 0) {
+ bufObj = ctx->Shared->NullBufferObj;
+ } else {
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ }
+
if (!bufObj) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBindBufferOffsetEXT(invalid buffer=%u)", buffer);