diff options
author | Brian Paul <[email protected]> | 2004-11-09 01:08:04 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-11-09 01:08:04 +0000 |
commit | e677da9e54e836609f94a3aaca27d68a0bacbb96 (patch) | |
tree | 9af963b30c60c4d109da3dbc31dd4c9570f153c5 /src | |
parent | c55c963f4c3ec6101241501de0f759520b985853 (diff) |
added a comment and assertion in _mesa_clip_drawpixels() for PixelZoom
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/image.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index f781687c0fa..17737cafcfd 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -4063,6 +4063,7 @@ _mesa_unpack_image( GLsizei width, GLsizei height, GLsizei depth, * Perform clipping for glDrawPixels. The image's window position * and size, and the unpack skipPixels and skipRows are adjusted so * that the image region is entirely within the window and scissor bounds. + * NOTE: this will only work when glPixelZoom is (1, 1). * * \return GL_TRUE if image is ready for drawing or * GL_FALSE if image was completely clipped away (draw nothing) @@ -4075,6 +4076,8 @@ _mesa_clip_drawpixels(const GLcontext *ctx, { const GLframebuffer *buffer = ctx->DrawBuffer; + ASSERT(ctx->Pixel.ZoomX == 1.0F && ctx->Pixel.ZoomY == 1.0F); + /* left clipping */ if (*destX < buffer->_Xmin) { *skipPixels += (buffer->_Xmin - *destX); |