Comparison of GD and GX

Overview

GD functions and their corresponding GX functions are matched in the table below. Many of the GD functions are similar to their GX counterparts; as a result, individual function reference pages were not created for GD functions. Click on the GX function links to see relevant documents. For those GD functions that differ significantly or demand special attention, individual function reference pages are available.

Function List

GD Function GX Function Note
---GDGeometry.h---
GDSetVtxDescv GXSetVtxDescv No GD equivalent for GXSetVtxDesc.
GDSetVtxAttrFmtv GXSetVtxAttrFmtv No GD equivalent for GXSetVtxAttrFmt.
GDSetArray
GDSetArrayRaw
GDPatchArrayPtr
GXSetArray Multiple GD functions are implemented to simplify patching.
GDSetTexCoordGen GXSetTexCoordGen2 GD version does not include the matrix ID to use. Use GDSetCurrentMtx to set the matrix ID to use.
GDSetGenMode GXSetNumTexGens
GXSetNumChans
GXSetNumTevStages
All GX functions are combined into one.
Mask register is used to mask additional register settings.
GDSetGenMode2 All the above, plus:
GXSetNumIndStages
GXSetCullMode
All GX functions are combined into one.
Mask register is used to mask additional register settings.
GDSetCullMode GXSetCullMode Mask register is used to mask additional register settings.
GDSetLPSize GXSetPointSize
GXSetLineWidth
GXSetFieldMode
All GX functions are combined into one.
In the GD version of GXSetFieldMode, only the line aspect ratio functions.
GDSetCoPlanar GXSetCoPlanar  
GDBegin GXBegin GD version doesn't do error checking.
GDEnd GXEnd GD version doesn't do error checking.
---GDIndirect.h---
GDSetIndTexMtx GXSetIndTexMtx  
GDSetIndTexCoordScale GXSetIndTexCoordScale GD version sets two indirect stages at once.
GDSetIndTexOrder GXSetIndTexOrder GD version sets four indirect stages at once.
GDSetTevIndirect GXSetTevIndirect  
GDSetTevDirect GXSetTevDirect  
GDSetTevIndWarp GXSetTevIndWarp  
GDSetTevIndTile GXSetTevIndTile  
GDSetTevIndBumpST GXSetTevIndBumpST  
GDSetTevIndBumpXYZ GXSetTevIndBumpXYZ  
GDSetTevIndRepeat GXSetTevIndRepeat  
---GDLight.h---
GDSetLightAttn GXInitLightAttn GD version sets on specified hardware light register; GX version sets on light object.
GDSetLightSpot GXInitLightSpot Same as above.
GDSetLightDistAttn GXInitLightDistAttn Same as above.
GDSetLightColor GXInitLightColor Same as above.
GDSetLightPos GXInitLightPos Same as above.
GDSetLightDir GXInitLightDir Same as above.
GDSetSpecularDir GXInitSpecularDir Same as above.
GDSetSpecularDirHA GXInitSpecularDirHA Same as above.
GDSetLightShininess GXInitLightShininess Same as above. (The GD version is an inline. The GX version is a macro.)
GDLoadLightObjIndx GXLoadLightObjIndx  
GDSetChanAmbColor GXSetChanAmbColor  
GDSetChanMatColor GXSetChanMatColor  
GDSetChanCtrl GXSetChanCtrl  
---GDPixel.h---
GDSetFog GXSetFog  
GDSetBlendMode GXSetBlendMode Mask register is used to mask additional register settings.
GDSetBlendModeEtc GXSetBlendMode
GXSetColorUpdate
GXSetAlphaUpdate
GXSetDither
All GX functions are combined into one.
GDSetZMode GXSetZMode  
GDSetDstAlpha GXSetDstAlpha  
GDSetDrawSync GXSetDrawSync  
---GDTev.h---
GDSetTevOp GXSetTevOp GD version sets swaps for rasterized color and texture color to GX_TEV_SWAP0.
GDSetTevColorCalc GXSetTevColorIn
GXSetTEvColorOp
Both GX functions are combined into one.
GDSetAlphaCalcAndSwap GXSetTevAlphaIn
GXSetTevAlphaOp
GXSetTevSwapMode
All three GX functions are combined into one.
GDSetTevColor GXSetTevColor  
GDSetTevColorS10 GXSetTevColorS10  
GDSetTevKColor GXSetTevKColor  
GDSetTevKonstantSel GXSetTevKColorSel
GXSetTevKAlphaSel
Both GX functions are combined into one.
GD version sets two TEV stages at once. Also see functions below.
GDSetTevSwapModeTable GXSetTevSwapModeTable GD version uses mask registers for avoiding collision. GX version uses shadow registers.
GDSetAlphaCompare GXSetAlphaCompare  
GDSetZTexture GXSetZTexture  
GDSetTevOrder GXSetTevOrder GD version sets two TEV stages at once.
---GDTexture.h---
GDSetTexLookupMode GXInitTexObj
GXInitTexObjLOD
Two GX functions are combined into one function. (Partially omitted. See functions to follow.)

       The GD version sets hardware registers directly. The GX version initializes a TexObj.
GDSetTexImgAttr GXInitTexObj The GD version sets hardware registers directly. The GX version initializes a TexObj.
GDSetTexImgPtr
GDSetTexImgPtrRaw
GDPatchTexImgPtr
GXInitTexObjData Same as above. Multiple GD functions are implemented to simplify patching.
GDSetTexTlut GXInitTexObjTlut
GXInitTlutRegion
The GD version sets hardware registers directly. The GX version manipulates objects.
The GX version uses callbacks to allocate memory. The GD version does not.
GDSetTexCached GXInitTexCacheRegion Same as above.
GDSetTexPreLoaded GXInitTexPreLoadRegion Same as above.
GDSetTexCoordScale GXSetTexCoordScaleManually Manual setting of all texture coordinates should be enabled.
GDSetTexCoordScale2 GXSetTexCoordScaleManually
GXSetTexCoordCylWrap
GXSetTexCoordBias
Same as above.
All three GX functions are combined into one.
GDSetTexCoordScaleAndTOEs GXSetTexCoordScaleManually
GXSetTexCoordCylWrap
GXSetTexCoordBias
GXEnableTexOffsets
Manual setting of all texture coordinates should be enabled.
All four GX functions are combined into one.
GDLoadTlut
GDLoadTlutRaw
GDPatchTlutPtr
GXInitTlutObj
GXInitTlutRegion
GXLoadTlut
GX version uses TLUT objects and callbacks. The GD version does not.
--GDTransform.h---
GDLoadPosMtxImm GXLoadPosMtxImm  
GDLoadPosMtxIndx GXLoadPosMtxIndx  
GDLoadNrmMtxImm GXLoadNrmMtxImm  
GDLoadNrmMtxImm3x3 GXLoadNrmMtxImm3x3  
GDLoadNrmMtxIndx3x3 GXLoadNrmMtxIndx3x3  
GDLoadTexMtxImm GXLoadTexMtxImm  
GDLoadTexMtxIndx GXLoadTexMtxIndx  
GDSetCurrentMtx GXSetCurrentMtx The GD version also sets the current texture transform matrices (set inside GXSetTexCoordGen).
GDSetProjection GXSetProjection  
--GDVertex.h---
GDMatrixIndex1u8 GXMatrixIndex1u8  
GDPosition[n][t] GXPosition[n][t]  
GDNormal[n][t] GXNormal[n][t]  
GDColor[n][t] GXColor[n][t]  
GDTexCoord[n][t] GXTexCoord[n][t]  

Revision History

2006/03/01 Initial version.


CONFIDENTIAL