77 GLboolean scale_or_bias, quick_draw, zoom;
82 if (
ctx->Pixel.ZoomX==1.0F &&
ctx->Pixel.ZoomY==1.0F) {
103 scale_or_bias =
ctx->Pixel.RedScale!=1.0 ||
ctx->Pixel.RedBias!=0.0
104 ||
ctx->Pixel.GreenScale!=1.0 ||
ctx->Pixel.GreenBias!=0.0
105 ||
ctx->Pixel.BlueScale!=1.0 ||
ctx->Pixel.BlueBias!=0.0
106 ||
ctx->Pixel.AlphaScale!=1.0 ||
ctx->Pixel.AlphaBias!=0.0;
108 if (
ctx->Depth.Test) {
116 if (
ctx->RasterMask==0 && !zoom
125 setbuffer =
ctx->Pixel.ReadBuffer!=
ctx->Color.DrawBuffer;
131 (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Pixel.ReadBuffer );
137 GLfloat gbias =
ctx->Pixel.GreenBias *
ctx->Visual->GreenScale;
138 GLfloat bbias =
ctx->Pixel.BlueBias *
ctx->Visual->BlueScale;
139 GLfloat abias =
ctx->Pixel.AlphaBias *
ctx->Visual->AlphaScale;
156 if (
ctx->Pixel.MapColorFlag) {
157 GLfloat r = (
ctx->Pixel.MapRtoRsize-1) *
ctx->Visual->InvRedScale;
158 GLfloat g = (
ctx->Pixel.MapGtoGsize-1) *
ctx->Visual->InvGreenScale;
159 GLfloat b = (
ctx->Pixel.MapBtoBsize-1) *
ctx->Visual->InvBlueScale;
160 GLfloat a = (
ctx->Pixel.MapAtoAsize-1) *
ctx->Visual->InvAlphaScale;
175 (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Color.DrawBuffer );
177 if (quick_draw &&
dy>=0 && dy<ctx->
Buffer->Height) {
209 if (
ctx->Pixel.ZoomX==1.0F &&
ctx->Pixel.ZoomY==1.0F) {
230 if (
ctx->Depth.Test) {
239 setbuffer =
ctx->Pixel.ReadBuffer!=
ctx->Color.DrawBuffer;
244 (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Pixel.ReadBuffer );
249 if (
ctx->Pixel.IndexShift ||
ctx->Pixel.IndexOffset) {
250 if (
ctx->Pixel.IndexShift<0) {
252 indx[
i] = (indx[
i] >> -
ctx->Pixel.IndexShift)
253 +
ctx->Pixel.IndexOffset;
258 indx[
i] = (indx[
i] <<
ctx->Pixel.IndexShift)
259 +
ctx->Pixel.IndexOffset;
265 if (
ctx->Pixel.MapColorFlag) {
267 if (indx[
i] <
ctx->Pixel.MapItoIsize) {
268 indx[
i] =
ctx->Pixel.MapItoI[ indx[
i] ];
275 (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Color.DrawBuffer );
304 if (!
ctx->Buffer->Depth) {
309 if (
ctx->Pixel.ZoomX==1.0F &&
ctx->Pixel.ZoomY==1.0F) {
331 if (
ctx->Visual->RGBAflag) {
333 r =
ctx->Current.ByteColor[0];
334 g =
ctx->Current.ByteColor[1];
335 b =
ctx->Current.ByteColor[2];
336 a =
ctx->Current.ByteColor[3];
344 indx[
i] =
ctx->Current.Index;
357 if (
ctx->Visual->RGBAflag) {
391 if (!
ctx->Buffer->Stencil) {
396 if (
ctx->Pixel.ZoomX==1.0F &&
ctx->Pixel.ZoomY==1.0F) {
421 if (
ctx->Pixel.IndexShift<0) {
424 +
ctx->Pixel.IndexOffset;
430 +
ctx->Pixel.IndexOffset;
434 if (
ctx->Pixel.MapStencilFlag) {
475 if (!
ctx->Current.RasterPosValid) {
478 destx = (
GLint) (
ctx->Current.RasterPos[0] + 0.5F);
479 desty = (
GLint) (
ctx->Current.RasterPos[1] + 0.5F);
499 color[0] =
ctx->Current.ByteColor[0] *
ctx->Visual->InvRedScale;
500 color[1] =
ctx->Current.ByteColor[1] *
ctx->Visual->InvGreenScale;
501 color[2] =
ctx->Current.ByteColor[2] *
ctx->Visual->InvBlueScale;
502 color[3] =
ctx->Current.ByteColor[3] *
ctx->Visual->InvAlphaScale;
505 ctx->Current.RasterPos[1],
506 ctx->Current.RasterPos[2],
507 ctx->Current.RasterPos[3],
509 ctx->Current.TexCoord );
static void copy_ci_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint width, GLint height, GLint destx, GLint desty)
void gl_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLenum type)
static void copy_rgb_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint width, GLint height, GLint destx, GLint desty)
static void copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint width, GLint height, GLint destx, GLint desty)
static void copy_depth_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint width, GLint height, GLint destx, GLint desty)
void gl_error(GLcontext *ctx, GLenum error, const char *s)
void gl_update_state(GLcontext *ctx)
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
GLuint GLuint GLsizei GLenum type
#define GL_INVALID_OPERATION
GLclampf GLclampf GLclampf alpha
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
#define GL_COPY_PIXEL_TOKEN
GLint GLint GLsizei width
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 DEFARRAY(TYPE, NAME, SIZE)
#define MEMSET(DST, VAL, N)
#define INSIDE_BEGIN_END(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_write_zoomed_stencil_span(GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte stencil[], GLint y0)
void gl_read_color_span(GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte red[], GLubyte green[], GLubyte blue[], GLubyte alpha[])
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_read_index_span(GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint indx[])
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[])
void gl_read_stencil_span(GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte stencil[])
#define CLAMP(f, min, max)