al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
gSPTextureFormat#include "gbi.h" gSPTexture(Gfx *gdl, int sc, int tc, int level, int tile, int on) gsSPTexture(int sc, int tc, int level, int tile, int on)Arguments
It sets the parameters in the RSP for texturing. The resulting texture coordinates are computed by the RSP using this formula: out_texture_coord = scale * in_texture_coord The final output texture coordinate is based on an application-defined intersection of the sc and tc scale parameters and the s,t coordinates of the model. It is the application's responsibility to combine these so that the binary point in the final s,t values is an appropriate S10.5 format number. A typical example might use an sc and tc values of 0.5, and then scale the s,t coordinates in the model up by 2.0. The texture tile tells the RDP which texture tile you want to use. In case of mip-mapping, it sends the lowest number in the tile sequence that represents the mip-map (in other words, the tile number of the finest map). Therefore, for a sequence of tiles (n, n+1, n+2, and so on), n is the finest map tile and the one you set in this macro; whereas n+1, n+2, and so on are the decreasing resolution tiles. If you have detailed textures, they should be loaded at tile n with the finest resolution map at n+1. The on argument is either G_ON or G_OFF. In the case of G_OFF, the other parameters are still updated, which could be a source of display list bugs if the state of the texture engine is assumed later. See Also gDPLoadTexture gDPSetTextureImage
|