diff options
author | Brian Paul <[email protected]> | 2008-06-20 11:31:05 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-06-20 11:31:05 -0600 |
commit | 8e0f166eb5edb8537af573d8d33a26ffaf8e66c9 (patch) | |
tree | 8efef612201208ef59cf26a76c9d052a835b3ef1 /src/mesa/main/pixelstore.c | |
parent | 722db809e64cab61846c3f086fcba4847caad216 (diff) |
mesa: refactor: move initialization of DefaultPacking state.
Diffstat (limited to 'src/mesa/main/pixelstore.c')
-rw-r--r-- | src/mesa/main/pixelstore.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/pixelstore.c b/src/mesa/main/pixelstore.c index 3bf89bd3e18..ff1a6344cc9 100644 --- a/src/mesa/main/pixelstore.c +++ b/src/mesa/main/pixelstore.c @@ -260,4 +260,24 @@ _mesa_init_pixelstore( GLcontext *ctx ) #if FEATURE_EXT_pixel_buffer_object ctx->Unpack.BufferObj = ctx->Array.NullBufferObj; #endif + + /* + * _mesa_unpack_image() returns image data in this format. When we + * execute image commands (glDrawPixels(), glTexImage(), etc) from + * within display lists we have to be sure to set the current + * unpacking parameters to these values! + */ + ctx->DefaultPacking.Alignment = 1; + ctx->DefaultPacking.RowLength = 0; + ctx->DefaultPacking.SkipPixels = 0; + ctx->DefaultPacking.SkipRows = 0; + ctx->DefaultPacking.ImageHeight = 0; + ctx->DefaultPacking.SkipImages = 0; + ctx->DefaultPacking.SwapBytes = GL_FALSE; + ctx->DefaultPacking.LsbFirst = GL_FALSE; + ctx->DefaultPacking.ClientStorage = GL_FALSE; + ctx->DefaultPacking.Invert = GL_FALSE; +#if FEATURE_EXT_pixel_buffer_object + ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj; +#endif } |