Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
else {
/* non-default buffer object */
newBufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (newBufObj == NULL && ctx->API == API_OPENGL_CORE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBindBuffer(non-gen name)");
+ return;
+ }
handle_bind_buffer_gen(ctx, target, buffer, &newBufObj);
}
}
}
else {
+ if (ctx->API == API_OPENGL_CORE) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBindTexture");
+ return;
+ }
+
/* if this is a new texture id, allocate a texture object now */
newTexObj = ctx->Driver.NewTextureObject(ctx, texName, target);
if (!newTexObj) {