96{
99
102 return;
103 }
104
105 if (
ctx->Visual->AccumBits==0 || !
ctx->Buffer->Accum) {
106
107 gl_warning(
ctx,
"Calling glAccum() without an accumulation buffer");
108 return;
109 }
110
112 acc_scale = 127.0;
113 }
115 acc_scale = 32767.0;
116 }
117 else {
118
120 }
121
122
123 if (
ctx->Scissor.Enabled) {
124 xpos =
ctx->Scissor.X;
125 ypos =
ctx->Scissor.Y;
128 }
129 else {
130
131 xpos = 0;
132 ypos = 0;
135 }
136
139 {
142
145 acc =
ctx->Buffer->Accum
146 + (ypos *
ctx->Buffer->Width + xpos) * 4;
148 *acc += ival; acc++;
149 *acc += ival; acc++;
150 *acc += ival; acc++;
151 *acc += ival; acc++;
152 }
153 ypos++;
154 }
155 }
156 break;
158 {
161
163 acc =
ctx->Buffer->Accum
164 + (ypos *
ctx->Buffer->Width + xpos) * 4;
170 }
171 ypos++;
172 }
173 }
174 break;
176 {
180 GLfloat rscale, gscale, bscale, ascale;
182
183 (
void) (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Pixel.ReadBuffer );
184
185
186 rscale =
value * acc_scale *
ctx->Visual->InvRedScale;
187 gscale =
value * acc_scale *
ctx->Visual->InvGreenScale;
188 bscale =
value * acc_scale *
ctx->Visual->InvBlueScale;
189 ascale =
value * acc_scale *
ctx->Visual->InvAlphaScale;
191 (*
ctx->Driver.ReadColorSpan)(
ctx,
width, xpos, ypos,
193 acc =
ctx->Buffer->Accum
194 + (ypos *
ctx->Buffer->Width + xpos) * 4;
200 }
201 ypos++;
202 }
203
204 (
void) (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Color.DrawBuffer );
205 }
206 break;
208 {
212 GLfloat rscale, gscale, bscale, ascale;
214
215 (
void) (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Pixel.ReadBuffer );
216
217
218 rscale =
value * acc_scale *
ctx->Visual->InvRedScale;
219 gscale =
value * acc_scale *
ctx->Visual->InvGreenScale;
220 bscale =
value * acc_scale *
ctx->Visual->InvBlueScale;
221 ascale =
value * acc_scale *
ctx->Visual->InvAlphaScale;
223 (*
ctx->Driver.ReadColorSpan)(
ctx,
width, xpos, ypos,
225 acc =
ctx->Buffer->Accum
226 + (ypos *
ctx->Buffer->Width + xpos) * 4;
232 }
233 ypos++;
234 }
235
236 (
void) (*
ctx->Driver.SetBuffer)(
ctx,
ctx->Color.DrawBuffer );
237 }
238 break;
240 {
244 GLfloat rscale, gscale, bscale, ascale;
245 GLint rmax, gmax, bmax, amax;
247
248 rscale =
value / acc_scale *
ctx->Visual->RedScale;
249 gscale =
value / acc_scale *
ctx->Visual->GreenScale;
250 bscale =
value / acc_scale *
ctx->Visual->BlueScale;
251 ascale =
value / acc_scale *
ctx->Visual->AlphaScale;
252 rmax = (
GLint)
ctx->Visual->RedScale;
253 gmax = (
GLint)
ctx->Visual->GreenScale;
254 bmax = (
GLint)
ctx->Visual->BlueScale;
255 amax = (
GLint)
ctx->Visual->AlphaScale;
257 acc =
ctx->Buffer->Accum
258 + (ypos *
ctx->Buffer->Width + xpos) * 4;
269 }
270 (*
ctx->Driver.WriteColorSpan)(
ctx,
width, xpos, ypos,
272 ypos++;
273 }
274 }
275 break;
276 default:
278 }
279}
void gl_warning(const GLcontext *ctx, const char *s)
void gl_error(GLcontext *ctx, GLenum error, const char *s)
#define GL_INVALID_OPERATION
GLclampf GLclampf GLclampf alpha
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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 INSIDE_BEGIN_END(CTX)
static float(__cdecl *square_half_float)(float x
#define CLAMP(f, min, max)