*/
#include "main/glheader.h"
-#include "bufferobj.h"
-#include "image.h"
+#include "main/bufferobj.h"
+#include "main/condrender.h"
+#include "main/image.h"
#include "main/macros.h"
-#include "pixel.h"
#include "s_context.h"
#include "s_span.h"
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap )
{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLint row, col;
GLuint count = 0;
SWspan span;
ASSERT(ctx->RenderMode == GL_RENDER);
- bitmap = _mesa_map_bitmap_pbo(ctx, unpack, bitmap);
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't draw */
+
+ bitmap = (const GLubyte *) _mesa_map_pbo_source(ctx, unpack, bitmap);
if (!bitmap)
return;
- RENDER_START(swrast,ctx);
+ swrast_render_start(ctx);
if (SWRAST_CONTEXT(ctx)->NewState)
_swrast_validate_derived( ctx );
}
}
- RENDER_FINISH(swrast,ctx);
+ swrast_render_finish(ctx);
- _mesa_unmap_bitmap_pbo(ctx, unpack);
+ _mesa_unmap_pbo_source(ctx, unpack);
}
ASSERT(ctx->RenderMode == GL_RENDER);
ASSERT(bitmap);
- RENDER_START(swrast,ctx);
+ swrast_render_start(ctx);
if (SWRAST_CONTEXT(ctx)->NewState)
_swrast_validate_derived( ctx );
}
}
- RENDER_FINISH(swrast,ctx);
+ swrast_render_finish(ctx);
}
#endif