#include <revolution/gd.h>
void GDSetTexCoordScale (
GXTexCoordID coord,
u16 s_scale, u16 t_scale );
void GDSetTexCoordScale2 (
GXTexCoordID coord,
u16 s_scale, GXBool s_bias, GXBool s_wrap,
u16 t_scale, GXBool t_bias, GXBool t_wrap );
void GDSetTexCoordScaleAndTOEs (
GXTexCoordID coord,
u16 s_scale, GXBool s_bias, GXBool s_wrap,
u16 t_scale, GXBool t_bias, GXBool t_wrap,
GXBool line_offset, GXBool point_offset );
coord |
Which texture coordinate ID is being changed. |
|---|---|
s_scale |
Manual scale value for the computed S component (width) of the coordinate. |
s_bias |
Whether to apply biasing to the S component (only use with GX_REPERT). |
s_wrap |
Whether to apply cylindrical wrapping to the S component. |
t_scale |
Manual scale value for the computed T (height) component of the coordinate. |
t_bias |
Whether to apply biasing to the T component (only use with GX_REPERT). |
t_wrap |
Whether to apply cylindrical wrapping to the T component. |
None.
Unlike the GX library, the GD library does not automatically scale texture coordinates. Therefore, you must manually set the texture coordinate scale according to the size of the texture that each coordinate is used with. In addition to the scale values, you must also set the bias and cylindrical wrap bits. The bias setting is described in GXSetTexCoordBias function. The cylindrical mapping setting is described in GXSetTexCoordCylWrap function. If you want to update only texture coordinate scale, you can use GDSetTexCoordScale function, otherwise GDSetTexCoordScale2 function is more suitable.
The function GDSetTexCoordScaleAndTOEs also lets you set the texture offset enable bits for the specified texture coordinate. The enable bit of the texture offset determines whether the texture offset is added to the texture coordinates at the opposite angle of lines and points. For details, see GXEnableTexOffsets.
GDSetTexCoordScale function and GDSetTexCoordScale2 function use the hardware mask register to avoid changing the texture-offset enable bits.
GXSetTexCoordScaleManually, GXSetTexCoordBias, GXSetTexCoordCylWrap, GXEnableTexOffsets
2006/03/01 Initial version.
CONFIDENTIAL