mesa: remove pointless null ptr check, improved some error messages

This commit is contained in:
Brian Paul
2009-05-14 16:51:10 -06:00
parent 39d7524f7b
commit f7ca97f85e

View File

@@ -490,7 +490,7 @@ bind_buffer_object(GLcontext *ctx, GLenum target, GLuint buffer)
_mesa_reference_buffer_object(ctx, bindTarget, newBufObj); _mesa_reference_buffer_object(ctx, bindTarget, newBufObj);
/* Pass BindBuffer call to device driver */ /* Pass BindBuffer call to device driver */
if (ctx->Driver.BindBuffer && newBufObj) if (ctx->Driver.BindBuffer)
ctx->Driver.BindBuffer( ctx, target, newBufObj ); ctx->Driver.BindBuffer( ctx, target, newBufObj );
} }
@@ -937,7 +937,7 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
return; return;
} }
if (bufObj->Name == 0) { if (bufObj->Name == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBufferDataARB" ); _mesa_error(ctx, GL_INVALID_OPERATION, "glBufferDataARB(buffer 0)" );
return; return;
} }
@@ -1025,7 +1025,7 @@ _mesa_MapBufferARB(GLenum target, GLenum access)
return NULL; return NULL;
} }
if (bufObj->Name == 0) { if (bufObj->Name == 0) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glMapBufferARB" ); _mesa_error(ctx, GL_INVALID_OPERATION, "glMapBufferARB(buffer 0)" );
return NULL; return NULL;
} }
if (bufObj->Pointer) { if (bufObj->Pointer) {