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