GxBuildVertices
function · gx · primitive
- Address
0x58a3d0· 886 bytes, up to0x58a745- Signature
void __fastcall (uint32_t n, void *p, uint32_t ps, void *nm, uint32_t ns, void *c, uint32_t cs, void *u, uint32_t us, void *v, uint32_t vs)- Meaning
- Interleaves strided arrays into a new vertex buffer, picking the format and swapping colour bytes for OpenGl
- Confidence
- verified, proof one
- Finding
- gx/draw#interleaving-helper
Finding: Interleaving helper in gx: drawing
0x58a3d0(count, pos, posStride, normal, normalStride, colour, colourStride, tex0, tex0Stride, tex1, tex1Stride) creates a vertex buffer of count vertices and fills it from strided arrays. It picks the format from which of normal, colour, texcoord 0 and texcoord 1 are non-null: none 0; normal 1; normal and colour 2; normal and tex0 3; normal, colour, tex0 4; normal, tex0, tex1 5; all four 6; colour 7; colour and tex0 8; colour, tex0, tex1 9; tex0 10; tex0 and tex1 11; texcoord 1 without texcoord 0 gives 1. Position and normal copy 12 bytes, texture coordinates 8. A colour copies as the dword, except that when the capability block's +0x1c equals 1 its bytes are reordered from AARRGGBB to AABBGGRR.
The derivation is in the doc.
Callers 16
- GxBuildVerticesCounted gx
- BindGroupBuffers terrain
- DrawGroupVertexColors terrain
- DrawGroupUnlitTextures terrain
- DrawGroupPortals terrain
- DrawGroupFaceFlags terrain
- DrawGroupNormals terrain
- DrawQueryCells terrain
- RenderGlowPass ffxeffects
- RenderDeathPass ffxeffects
- RenderDeathCombinerPass ffxeffects
- QueryGlareOcclusion lighting
- DrawGlare lighting
- DrawDisc lighting
- DrawSkyGradient lighting
- DrawClouds lighting
Callees 7
- GxVertexStride gx
- 0x589ab0 gx
- GxBufLock gx
- GxBufUnlock gx
- GxBufCreate gx
- GxDeviceCaps gx
- GxVertexBufBind gx
Calls and jumps by a bare address, from tables/calls.tsv.