N64® Functions Menu

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

Nintendo® Confidential

## gDPSetTexturePersp [macro]

Enables/disables texture map perspective correction.

Syntax

    #include <ultra64.h>  /* gbi.h */
    gDPSetTexturePersp(Gfx *gdl, u32 enable)
    gsDPSetTexturePersp(u32 enable)

Arguments

- gdl is the display list pointer.

- enable is the perspective correction flag:
  G_TP_NONE (Disable perspective correction)
  G_TP_PERSP (Enable perspective correction)

Explanation
Enables/disables perspective correction in texture sampling mode. When perspective correction is turned on, texture coordinates are corrected at every pixel by the RDP. For details, see Section 12.4.6, "Texture-Sampling Modes," in the N64 Online Programming Manual.

Notes
Perspective correction must be enabled when you are rendering textured triangles, regardless of whether you are using perspective projection or orthogonal projection. This is because perspective correction improves the precision of the texture coordinates. On the other hand, you should always disable perspective correction when drawing textured rectangles (hardware sprites).

See Also
gDPSetPrimColor
gDPSetTextureDetail
gDPSetTextureLOD
gDPSetTextureLUT

Revision History
2/1/99 Completely rewritten.

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999