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.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "glheader.h"
|
||||
#include "imports.h"
|
||||
#include "image.h"
|
||||
#include "colormac.h"
|
||||
#include "context.h"
|
||||
#include "macros.h"
|
||||
@@ -1682,7 +1683,8 @@ void _mesa_update_pixel( GLcontext *ctx, GLuint new_state )
|
||||
/***** Initialization *****/
|
||||
/**********************************************************************/
|
||||
|
||||
void _mesa_init_pixel( GLcontext * ctx )
|
||||
void
|
||||
_mesa_init_pixel( GLcontext * ctx )
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1774,6 +1776,9 @@ void _mesa_init_pixel( GLcontext * ctx )
|
||||
ctx->Pack.LsbFirst = GL_FALSE;
|
||||
ctx->Pack.ClientStorage = GL_FALSE;
|
||||
ctx->Pack.Invert = GL_FALSE;
|
||||
#if FEATURE_EXT_pixel_buffer_object
|
||||
ctx->Pack.BufferObj = ctx->Array.NullBufferObj;
|
||||
#endif
|
||||
ctx->Unpack.Alignment = 4;
|
||||
ctx->Unpack.RowLength = 0;
|
||||
ctx->Unpack.ImageHeight = 0;
|
||||
@@ -1784,6 +1789,29 @@ void _mesa_init_pixel( GLcontext * ctx )
|
||||
ctx->Unpack.LsbFirst = GL_FALSE;
|
||||
ctx->Unpack.ClientStorage = GL_FALSE;
|
||||
ctx->Unpack.Invert = GL_FALSE;
|
||||
#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
|
||||
|
||||
if (ctx->Visual.doubleBufferMode) {
|
||||
ctx->Pixel.ReadBuffer = GL_BACK;
|
||||
|
Reference in New Issue
Block a user