From 7a6b71ef2944bae1718e8167b2faaceb8422071c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 13 Mar 2004 18:21:40 +0000 Subject: Implementation of GL_EXT_pixel_buffer_object extension. Note: extension may not be finalized yet - subject to change! Note: implementation not fully suitable for h/w implementation yet. --- src/mesa/main/drawpix.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'src/mesa/main/drawpix.c') diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index 745d7a304d..fc7dd32b06 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) { -- cgit v1.2.3