107 zoom =
ctx->Pixel.ZoomX!=1.0 ||
ctx->Pixel.ZoomY!=1.0;
110 x = (
GLint) (
ctx->Current.RasterPos[0] + 0.5F);
111 y = (
GLint) (
ctx->Current.RasterPos[1] + 0.5F);
113 if (
ctx->Depth.Test) {
190 if (
ctx->Pixel.IndexOffset ||
ctx->Pixel.IndexShift) {
191 if (
ctx->Pixel.IndexShift>=0) {
193 ispan[
j] = (ispan[
j] <<
ctx->Pixel.IndexShift)
194 +
ctx->Pixel.IndexOffset;
199 ispan[
j] = (ispan[
j] >> -
ctx->Pixel.IndexShift)
200 +
ctx->Pixel.IndexOffset;
205 if (
ctx->Visual->RGBAflag) {
226 if (
ctx->Pixel.MapColorFlag) {
228 ispan[
j] =
ctx->Pixel.MapItoI[ispan[
j]];
251 zoom =
ctx->Pixel.ZoomX!=1.0 ||
ctx->Pixel.ZoomY!=1.0;
254 x = (
GLint) (
ctx->Current.RasterPos[0] + 0.5F);
255 y = (
GLint) (
ctx->Current.RasterPos[1] + 0.5F);
324 if (
ctx->Pixel.IndexOffset ||
ctx->Pixel.IndexShift) {
325 if (
ctx->Pixel.IndexShift>=0) {
328 +
ctx->Pixel.IndexOffset;
334 +
ctx->Pixel.IndexOffset;
340 if (
ctx->Pixel.MapStencilFlag) {
367 bias_or_scale =
ctx->Pixel.DepthBias!=0.0 ||
ctx->Pixel.DepthScale!=1.0;
368 zoom =
ctx->Pixel.ZoomX!=1.0 ||
ctx->Pixel.ZoomY!=1.0;
371 x = (
GLint) (
ctx->Current.RasterPos[0] + 0.5F);
372 y = (
GLint) (
ctx->Current.RasterPos[1] + 0.5F);
376 if (
ctx->Visual->RGBAflag) {
378 r = (
GLint) (
ctx->Current.RasterColor[0] *
ctx->Visual->RedScale);
379 g = (
GLint) (
ctx->Current.RasterColor[1] *
ctx->Visual->GreenScale);
380 b = (
GLint) (
ctx->Current.RasterColor[2] *
ctx->Visual->BlueScale);
381 a = (
GLint) (
ctx->Current.RasterColor[3] *
ctx->Visual->AlphaScale);
390 ispan[
i] =
ctx->Current.RasterIndex;
401 while ((
max&0x80000000)==0) {
487 if (
ctx->Pixel.DepthScale!=1.0 ||
ctx->Pixel.DepthBias!=0.0) {
498 if (
ctx->Visual->RGBAflag) {
533 zoom =
ctx->Pixel.ZoomX != 1.0 ||
ctx->Pixel.ZoomY != 1.0;
536 x = (
GLint) (
ctx->Current.RasterPos[0] + 0.5F);
537 y = (
GLint) (
ctx->Current.RasterPos[1] + 0.5F);
550 if (
ctx->Pixel.RedScale != 1.0F ||
ctx->Pixel.RedBias != 0.0F
551 ||
ctx->Pixel.GreenScale != 1.0F ||
ctx->Pixel.GreenBias != 0.0F
552 ||
ctx->Pixel.BlueScale != 1.0F ||
ctx->Pixel.BlueBias != 0.0F
553 ||
ctx->Pixel.AlphaScale != 1.0F ||
ctx->Pixel.AlphaBias != 0.0F)
563 if (
ctx->RasterMask == 0 && !zoom &&
x >= 0 &&
y >= 0
564 &&
x + width <= ctx->
Buffer->Width
565 &&
y + height <= ctx->
Buffer->Height)
577 && !
ctx->Pixel.MapColorFlag
578 && !scale_or_bias &&
ctx->Visual->EightBitColor)
666 lum, lum, lum,
alpha, desty);
680 GLboolean r_flag, g_flag, b_flag, a_flag, l_flag;
684 r_flag = g_flag = b_flag = a_flag = l_flag =
GL_FALSE;
705 r_flag = g_flag = b_flag =
GL_TRUE;
710 r_flag = g_flag = b_flag =
GL_TRUE;
722 r_flag = g_flag = b_flag = a_flag =
GL_TRUE;
727 r_flag = g_flag = b_flag = a_flag =
GL_TRUE;
910 rf[
j] = gf[
j] = bf[
j] = *
src++;
914 bf[
j] = b_flag ? *
src++ : 0.0;
915 gf[
j] = g_flag ? *
src++ : 0.0;
916 rf[
j] = r_flag ? *
src++ : 0.0;
920 rf[
j] = r_flag ? *
src++ : 0.0;
921 gf[
j] = g_flag ? *
src++ : 0.0;
922 bf[
j] = b_flag ? *
src++ : 0.0;
924 af[
j] = a_flag ? *
src++ : 1.0;
939 r = rf[
j] *
ctx->Pixel.RedScale +
ctx->Pixel.RedBias;
940 g = gf[
j] *
ctx->Pixel.GreenScale +
ctx->Pixel.GreenBias;
941 b = bf[
j] *
ctx->Pixel.BlueScale +
ctx->Pixel.BlueBias;
942 a = af[
j] *
ctx->Pixel.AlphaScale +
ctx->Pixel.AlphaBias;
951 if (
ctx->Pixel.MapColorFlag)
959 rf[
j] =
ctx->Pixel.MapRtoR[(
GLint) (rf[
j] * rscale)];
960 gf[
j] =
ctx->Pixel.MapGtoG[(
GLint) (gf[
j] * gscale)];
961 bf[
j] =
ctx->Pixel.MapBtoB[(
GLint) (bf[
j] * bscale)];
962 af[
j] =
ctx->Pixel.MapAtoA[(
GLint) (af[
j] * ascale)];
1023 GLint bytes_per_row;
1026 bytes_per_row =
width * 3 + (
width %
ctx->Unpack.Alignment);
1028 if (!
ctx->Current.RasterPosValid) {
1033 x = (
GLint) (
ctx->Current.RasterPos[0] + 0.5F);
1034 y = (
GLint) (
ctx->Current.RasterPos[1] + 0.5F);
1084 if (!
ctx->Current.RasterPosValid) {
1114 if (
ctx->Current.RasterPosValid) {
1116 color[0] =
ctx->Current.ByteColor[0] *
ctx->Visual->InvRedScale;
1117 color[1] =
ctx->Current.ByteColor[1] *
ctx->Visual->InvGreenScale;
1118 color[2] =
ctx->Current.ByteColor[2] *
ctx->Visual->InvBlueScale;
1119 color[3] =
ctx->Current.ByteColor[3] *
ctx->Visual->InvAlphaScale;
1120 invq = 1.0F /
ctx->Current.TexCoord[3];
1121 texcoord[0] =
ctx->Current.TexCoord[0] * invq;
1122 texcoord[1] =
ctx->Current.TexCoord[1] * invq;
1123 texcoord[2] =
ctx->Current.TexCoord[2] * invq;
1124 texcoord[3] =
ctx->Current.TexCoord[3];
1127 ctx->Current.RasterPos[1],
1128 ctx->Current.RasterPos[2],
1129 ctx->Current.RasterPos[3],
1130 color,
ctx->Current.Index, texcoord );
1134 if (
ctx->Current.RasterPosValid) {
1155 if (
ctx->NewState) {
1160 if (!
ctx->CompileFlag &&
ctx->Driver.DrawPixels) {
1172 &&
ctx->RasterMask==0 &&
ctx->CallDepth==0) {
1185 if (
ctx->CallDepth == 0) {
1196 if (
ctx->CompileFlag) {
1199 if (
ctx->ExecuteFlag) {
1201 if (!
ctx->CompileFlag) {
void gl_save_DrawPixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
void gl_problem(const GLcontext *ctx, const char *s)
void gl_error(GLcontext *ctx, GLenum error, const char *s)
void gl_update_state(GLcontext *ctx)
static void draw_depth_pixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum type, const GLvoid *pixels)
static void draw_color_pixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
static void draw_stencil_pixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum type, const GLvoid *pixels)
static void draw_index_pixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum type, const GLvoid *pixels)
static void drawpixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
static GLboolean quickdraw_rgb(GLcontext *ctx, GLsizei width, GLsizei height, const void *pixels)
void gl_DrawPixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
void gl_feedback_vertex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w, const GLfloat color[4], GLfloat index, const GLfloat texcoord[4])
void gl_update_hitflag(GLcontext *ctx, GLfloat z)
#define FEEDBACK_TOKEN(CTX, T)
GLint GLint GLsizei GLsizei GLsizei depth
#define GL_UNSIGNED_SHORT
GLint GLint GLint GLint GLint x
#define GL_LUMINANCE_ALPHA
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
GLuint GLuint GLsizei GLenum type
#define GL_INVALID_OPERATION
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
#define GL_DRAW_PIXEL_TOKEN
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLint GLint GLsizei GLsizei height
#define GL_DEPTH_COMPONENT
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLenum GLenum GLuint components
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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 j
#define UBYTE_TO_FLOAT(B)
#define DEFARRAY(TYPE, NAME, SIZE)
#define MEMSET(DST, VAL, N)
#define MEMCPY(DST, SRC, BYTES)
#define SHORT_TO_FLOAT(S)
#define INSIDE_BEGIN_END(CTX)
#define USHORT_TO_FLOAT(S)
GLvoid * gl_unpack_pixels(GLcontext *ctx, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
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_write_zoomed_stencil_span(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte stencil[], GLint y0)
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)