#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 );
|
ID of the texture coordinate to change. |
|
Manual scale value for the computed S component (width) of the coordinate. |
|
Whether to apply biasing to the S component (only use with GX_REPEAT). |
|
Whether to apply cylindrical wrapping to the S component. |
|
Manual scale value for the computed T (height) component of the coordinate. |
|
Whether to apply biasing to the T component (only use with GX_REPEAT). |
|
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 the GXSetTexCoordBias function. The cylindrical mapping setting is described in the GXSetTexCoordCylWrap function. If you want to update only the texture coordinate scale, you can use the GDSetTexCoordScale function; otherwise, the 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 the GXEnableTexOffsets function.
The GDSetTexCoordScale and GDSetTexCoordScale2 functions use the hardware mask register to prevent the enable bit of the texture offset to be changed.
GXSetTexCoordScaleManually
GXSetTexCoordBias
GXSetTexCoordCylWrap
GXEnableTexOffsets
03/01/2006 Initial version.