#include <revolution/gx.h>void GXSetTexCoordCylWrap(GXTexCoordID texcoord,
GXBool s_enable,
GXBool t_enable);texcoord |
Describes which texture coordinate ID is changed. Accepted values are: GX_TEXCOORD0, GX_TEXCOORD1, GX_TEXCOORD2, ..., GX_TEXCOORD7 |
s_enable |
Enables cylindrical wrapping if GX_TRUE is set. Disables cylindrical wrapping if GX_FALSE is set |
t_enable |
Enables cylindrical wrapping if GX_TRUE is set. Disables cylindrical wrapping if GX_FALSE is set. |
None.
This function allows one to enable cylindrical texture coordinate wrapping for the components of a given texture coordinate. Imagine wrapping a texture around a cylinder. Let's assume that the S coordinate goes around the cylinder and the T component follows the length of the cylinder. Cylindrical wrapping allows a primitive to cross the S=1.0/S=0.0 boundary and still display the texture properly. Interpolating from 0.9 to 0.1 is done by assuming that the interpolation value really is from -0.9 up to 0.1, not 0.9 down to 0.1. This interpolation adjustment is only performed if the "spread" between the minimum value and the current value is >= 0.5. If the spread is smaller than 0.5, regular (unadjusted) interpolation takes place. Turning off cylindrical wrapping disables the adjustment. GXInit turns off cylindrical wrapping by default.
Note: Cylindrical texture coordinate wrapping may not work properly when a primitive is clipped. "Clipping" infers clipping with the near or far planes, or clipping outside the guard band. Primitives clipped inside the guard band are not a problem, since they are in fact scissored and not clipped.
03/01/2006 Initial version