iOS/buildlibs/armv7/allegro-4.4.2/addons/allegrogl/src/amesa/raster.c
/* Read a horizontal span of values from the depth buffer.
 */
Read a horizontal span of values from the depth buffer.
Read a horizontal span of values from the depth buffer .
static void AMesaReadDepthSpan( GLcontext *ctx, GLuint n, GLint x, GLint y,
	GLdepth depth[] )
{
	AMesaContext context = (AMesaContext)(ctx->DriverCtx);
	BITMAP *bmp = context->Buffer->Active;
	float* zb_addr = (float*)(bmp_write_line(context->Buffer->DepthBuffer, bmp->h - y) + x * sizeof(float));
	while (n--) {
		depth[0] = (GLdepth) (1. / zb_addr[0]);
		zb_addr++;
		depth++;
	}
}
static void AMesaReadDepthSpan ( GLcontext * ctx , GLuint n , GLint x , GLint y , GLdepth depth [ ] ) { AMesaContext context = ( AMesaContext ) ( ctx -> DriverCtx ) ; BITMAP * bmp = context -> Buffer -> Active ; float * zb_addr = ( float * ) ( bmp_write_line ( context -> Buffer -> DepthBuffer , bmp -> h - y ) + x * sizeof ( float ) ) ; while ( n -- ) { depth [ 0 ] = ( GLdepth ) ( 1. / zb_addr [ 0 ] ) ; zb_addr ++ ; depth ++ ; } }
Read a horizontal span of values from the depth buffer.
Read a horizontal span of values from the depth buffer .