83 ctx->Visual->EightBitColor &&
84 ctx->Pixel.RedBias==0.0 &&
ctx->Pixel.RedScale==1.0 &&
85 ctx->Pixel.GreenBias==0.0 &&
ctx->Pixel.GreenScale==1.0 &&
86 ctx->Pixel.BlueBias==0.0 &&
ctx->Pixel.BlueScale==1.0 &&
87 ctx->Pixel.AlphaBias==0.0 &&
ctx->Pixel.AlphaScale==1.0 &&
89 ctx->Pixel.ZoomX==1.0 &&
ctx->Pixel.ZoomY==1.0 &&
91 ctx->Unpack.RowLength==0 &&
92 ctx->Unpack.SkipPixels==0 &&
93 ctx->Unpack.SkipRows==0 &&
94 ctx->Unpack.SwapBytes==0 &&
95 ctx->Unpack.LsbFirst==0) {
118 ctx->Pixel.ZoomX = xfactor;
119 ctx->Pixel.ZoomY = yfactor;
155 if (
ctx->Pixel.ZoomX<0.0) {
178 if (r0>=
ctx->Buffer->Height &&
r1>=
ctx->Buffer->Height) {
200 if (
ctx->Pixel.ZoomX==-1.0F) {
203 i =
n - (
j+skipcol) - 1;
214 i = (
j+skipcol) * xscale;
215 if (
i<0)
i =
n +
i - 1;
225 for (
r=r0;
r<
r1;
r++) {
227 zred, zgreen, zblue, zalpha,
GL_BITMAP );
253 if (
ctx->Pixel.ZoomX<0.0) {
276 if (r0>=
ctx->Buffer->Height &&
r1>=
ctx->Buffer->Height) {
298 if (
ctx->Pixel.ZoomX==-1.0F) {
301 i =
n - (
j+skipcol) - 1;
302 zindexes[
j] = indexes[
i];
309 i = (
j+skipcol) * xscale;
310 if (
i<0)
i =
n +
i - 1;
311 zindexes[
j] = indexes[
i];
317 for (
r=r0;
r<
r1;
r++) {
343 if (
ctx->Pixel.ZoomX<0.0) {
366 if (r0>=
ctx->Buffer->Height &&
r1>=
ctx->Buffer->Height) {
388 if (
ctx->Pixel.ZoomX==-1.0F) {
391 i =
n - (
j+skipcol) - 1;
398 i = (
j+skipcol) * xscale;
399 if (
i<0)
i =
n +
i - 1;
405 for (
r=r0;
r<
r1;
r++) {
631 for (
i=0;
i<
ctx->Pixel.MapItoIsize;
i++) {
636 for (
i=0;
i<
ctx->Pixel.MapStoSsize;
i++) {
686 for (
i=0;
i<
ctx->Pixel.MapItoRsize;
i++) {
691 for (
i=0;
i<
ctx->Pixel.MapItoGsize;
i++) {
696 for (
i=0;
i<
ctx->Pixel.MapItoBsize;
i++) {
701 for (
i=0;
i<
ctx->Pixel.MapItoAsize;
i++) {
706 for (
i=0;
i<
ctx->Pixel.MapRtoRsize;
i++) {
711 for (
i=0;
i<
ctx->Pixel.MapGtoGsize;
i++) {
716 for (
i=0;
i<
ctx->Pixel.MapBtoBsize;
i++) {
721 for (
i=0;
i<
ctx->Pixel.MapAtoAsize;
i++) {
741 for (
i=0;
i<
ctx->Pixel.MapItoIsize;
i++) {
746 for (
i=0;
i<
ctx->Pixel.MapStoSsize;
i++) {
751 for (
i=0;
i<
ctx->Pixel.MapItoRsize;
i++) {
756 for (
i=0;
i<
ctx->Pixel.MapItoGsize;
i++) {
761 for (
i=0;
i<
ctx->Pixel.MapItoBsize;
i++) {
766 for (
i=0;
i<
ctx->Pixel.MapItoAsize;
i++) {
771 for (
i=0;
i<
ctx->Pixel.MapRtoRsize;
i++) {
776 for (
i=0;
i<
ctx->Pixel.MapGtoGsize;
i++) {
781 for (
i=0;
i<
ctx->Pixel.MapBtoBsize;
i++) {
786 for (
i=0;
i<
ctx->Pixel.MapAtoAsize;
i++) {
923 dst += width_in_bytes;
927 if (
ctx->Unpack.LsbFirst) {
938 width_in_bytes =
width *
n *
s;
957 dst += width_in_bytes;
961 if (
ctx->Unpack.SwapBytes &&
s>1) {
static unsigned char bytes[4]
#define MAX_PIXEL_MAP_TABLE
void gl_error(GLcontext *ctx, GLenum error, const char *s)
GLint gl_sizeof_type(GLenum type)
GLint gl_components_in_format(GLenum format)
GLvoid * gl_pixel_addr_in_image(struct gl_pixelstore_attrib *packing, const GLvoid *image, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint row)
void gl_flip_bytes(GLubyte *p, GLuint n)
void gl_swap4(GLuint *p, GLuint n)
void gl_swap2(GLushort *p, GLuint n)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
#define GL_UNPACK_SWAP_BYTES
#define GL_PACK_LSB_FIRST
GLint GLint GLint GLint GLint x
#define GL_PACK_ROW_LENGTH
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
#define GL_PACK_ALIGNMENT
#define GL_PIXEL_MAP_R_TO_R
#define GL_PIXEL_MAP_I_TO_I
GLuint GLuint GLsizei GLenum type
#define GL_INVALID_OPERATION
GLclampf GLclampf GLclampf alpha
#define GL_PIXEL_MAP_S_TO_S
#define GL_PACK_SKIP_PIXELS
GLint GLint GLint GLint GLint GLint y
#define GL_PIXEL_MAP_G_TO_G
#define GL_PIXEL_MAP_I_TO_R
#define GL_PIXEL_MAP_A_TO_A
#define GL_UNPACK_SKIP_PIXELS
#define GL_UNPACK_ALIGNMENT
#define GL_PIXEL_MAP_B_TO_B
#define GL_PACK_SKIP_ROWS
#define GL_PIXEL_MAP_I_TO_B
#define GL_PIXEL_MAP_I_TO_G
#define GL_PACK_SWAP_BYTES
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define GL_PIXEL_MAP_I_TO_A
GLint GLint GLsizei GLsizei height
#define GL_UNPACK_SKIP_ROWS
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
#define GL_UNPACK_LSB_FIRST
#define GL_UNPACK_ROW_LENGTH
GLboolean GLenum GLenum GLvoid * values
GLint GLfloat GLint stencil
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint mapsize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define MEMCPY(DST, SRC, BYTES)
#define FLOAT_TO_USHORT(X)
#define INSIDE_BEGIN_END(CTX)
void gl_PixelStorei(GLcontext *ctx, GLenum pname, GLint param)
void gl_GetPixelMapusv(GLcontext *ctx, GLenum map, GLushort *values)
void gl_GetPixelMapuiv(GLcontext *ctx, GLenum map, GLuint *values)
GLvoid * gl_unpack_pixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
void gl_PixelTransferf(GLcontext *ctx, GLenum pname, GLfloat param)
static void update_drawpixels_state(GLcontext *ctx)
void gl_write_zoomed_color_span(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLubyte red[], const GLubyte green[], const GLubyte blue[], const GLubyte alpha[], GLint y0)
void gl_write_zoomed_index_span(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLdepth z[], const GLuint indexes[], GLint y0)
void gl_PixelZoom(GLcontext *ctx, GLfloat xfactor, GLfloat yfactor)
void gl_write_zoomed_stencil_span(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte stencil[], GLint y0)
void gl_PixelMapfv(GLcontext *ctx, GLenum map, GLint mapsize, const GLfloat *values)
void gl_GetPixelMapfv(GLcontext *ctx, GLenum map, GLfloat *values)
void gl_write_color_span(GLcontext *ctx, GLuint n, GLint x, GLint y, GLdepth z[], GLubyte r[], GLubyte g[], GLubyte b[], GLubyte a[], GLenum primitive)
void gl_write_index_span(GLcontext *ctx, GLuint n, GLint x, GLint y, GLdepth z[], GLuint index[], GLenum primitive)
void gl_write_stencil_span(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte stencil[])
#define CLAMP(f, min, max)