guS2DEmuSetScissor

guS2DEmuSetScissor Function

Function

guS2DEmuSetScissor

Emulates gDPSetScissor

Syntax

#include <ultra64.h>        /* gs2dex.h */
void guS2DEmuSetScissor(u32 ulx, u32 uly, u32 lrx, u32 lry, u8 type);

Arguments

ulx
the upper-left X coordinate of scissor box (u10.0, 0 ~ 1023)
uly
the upper-left Y coordinate of scissor box (u10.0, 0 ~ 1023)
lrx
the lower-right X coordinate of scissor box (u10.0, 0 ~ 1023)
lry
the lower-right Y coordinate of scissor box (u10.0, 0 ~ 1023)
type
types of texture filter
TRUE (Bilinear filtering)
FALSE (PointSample)

Return Value

None.

Description

This function sets the scissoring parameters and texture filter referenced by the guS2DEmuBgRect1Cyc function. Usually, the range of the scissor box set by gDPSetScissor is handled by this function as parameters. For details on scissoring, see gDPSetScissor. See also N64 Programming Manual 13.7.5.3 "Bilinear filtering and PointSample" on texture filter.

* About type argument
TRUE
performs Bilerp interpolation with four texels that surrounds the pixels on screen.
FALSE
selects the closest texel to the pixels on screen.

Note

This function need only be called once before guS2DEmuBgRect1Cyc is called. As long as there is no change in the scissor box and texture filter, it need only be called once during game initialization. In other words, you don't need to call it every time a frame is drawn.

Comment

The initial values for ulx, uly, lrx, lry, and type are 0, 0, 320, 240, and FALSE respectively, which are settings that draw to a 320x240 pixel frame buffer with PointSample.

See Also

guS2DEmuBgRect1Cyc, gDPSetScissor, and gDPSetTextureFilter

Revision History

03/01/99 Completely revised.