diff options
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r-- | src/mesa/main/drawpix.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index 745d7a304d9..fc7dd32b06b 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.0.1 + * Version: 6.1 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -32,6 +32,7 @@ #include "state.h" #include "mtypes.h" + #if _HAVE_FULL_GL /* @@ -58,7 +59,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, if (ctx->RenderMode==GL_RENDER) { GLint x, y; - if (!pixels || !ctx->Current.RasterPosValid) { + if (!ctx->Current.RasterPosValid) { return; } @@ -93,6 +94,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, } } + void GLAPIENTRY _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLenum type ) @@ -148,7 +150,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, } } -#endif +#endif /* _HAVE_FULL_GL */ @@ -165,11 +167,6 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, return; } - if (!pixels) { - _mesa_error( ctx, GL_INVALID_VALUE, "glReadPixels(pixels)" ); - return; - } - if (ctx->NewState) _mesa_update_state(ctx); @@ -179,8 +176,6 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, - - void GLAPIENTRY _mesa_Bitmap( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, @@ -206,18 +201,16 @@ _mesa_Bitmap( GLsizei width, GLsizei height, } if (ctx->RenderMode==GL_RENDER) { - if (bitmap) { - /* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */ - GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig); - GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig); + /* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */ + GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig); + GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig); - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - ctx->OcclusionResult = GL_TRUE; - ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap ); + if (ctx->NewState) { + _mesa_update_state(ctx); } + + ctx->OcclusionResult = GL_TRUE; + ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap ); } #if _HAVE_FULL_GL else if (ctx->RenderMode==GL_FEEDBACK) { |