NNS_G2dSetRendererSpriteZoffset

Syntax

#include <nnsys/g2d/g2d_Renderer.h>

NNS_G2D_INLINE void NNS_G2dSetRendererSpriteZoffset
( 
    NNSG2dRendererInstance* pRend, 
    fx32                    spriteZoffset 
);

  

Arguments

pRend [OUT] Renderer entity.
spriteZoffset [IN] Value that Z is incremented each time a software sprite is rendered (must be 0 or a negative number).

Return Values

None.

Description

Specifies the Z-value added each time a software sprite is rendered.
The spriteZoffset value must be less than or equal to zero.
In the TWL and NITRO 3D Graphics Engine, if polygons have the same Z-value, the re-render determination is based on a comparison of screen Y-values. Therefore, for polygons to overwrite each other in the order they were rendered (as with OBJ rendering), in the case of software sprites you must avoid rendering polygons that have the same Z-value by slightly offsetting the polygon Z-values when rendering.

(The Z-value added to a sprite is reset each time a rendering function call (such as NNS_G2dDrawCell or NNS_G2dDrawMultiCell) completes. Therefore, when rendering a cell that consists of N OBJ, the Z-axis depth is N * spriteZoffset)

See Also

None.

Revision History

2008/06/20 Added descriptions for TWL.
2004/09/01 Initial version.


CONFIDENTIAL