Compute the region after we've locked (and possibly updated the buffer's size).
Same thing is needed for ctx->Driver.Clear().
}
if (ctx->RenderMode == GL_RENDER) {
- GLint x = ctx->DrawBuffer->_Xmin;
- GLint y = ctx->DrawBuffer->_Ymin;
- GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
- GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
- ctx->Driver.Accum(ctx, op, value, x, y, width, height);
+ ctx->Driver.Accum(ctx, op, value);
}
}
*/
/*@{*/
/**
- * Execute glAccum command within the given scissor region.
+ * Execute glAccum command.
*/
- void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value,
- GLint xpos, GLint ypos, GLint width, GLint height );
+ void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value );
/*@}*/
* Software fallback for glAccum.
*/
void
-_swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
- GLint xpos, GLint ypos,
- GLint width, GLint height )
-
+_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ GLint xpos, ypos, width, height;
if (SWRAST_CONTEXT(ctx)->NewState)
_swrast_validate_derived( ctx );
RENDER_START(swrast, ctx);
+ /* Compute region after calling RENDER_START so that we know the
+ * drawbuffer's size/bounds are up to date.
+ */
+ xpos = ctx->DrawBuffer->_Xmin;
+ ypos = ctx->DrawBuffer->_Ymin;
+ width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
+ height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
+
switch (op) {
case GL_ADD:
if (value != 0.0F) {
GLint x, GLint y, GLint width, GLint height );
extern void
-_swrast_Accum( GLcontext *ctx, GLenum op,
- GLfloat value, GLint xpos, GLint ypos,
- GLint width, GLint height );
+_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value);