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