GxVertexBufBind
function · gx · orchestration
- Address
0x58a7c0· 54 bytes, up to0x58a7f5- Signature
void __fastcall (void *buffer, uint32_t format)- Meaning
- Binds a buffer as the vertex stream with a vertex format id, setting its mask, stride and stream
- Confidence
- verified, proof one
- Finding
- gx/draw#vertex-formats
Finding: Vertex formats in gx: drawing
Thirteen formats are 16-byte records at 0x809c00: descriptor pointer, element count, stride, and a mask of components. Mask bit 0 is position (12 bytes), bit 3 normal (12), bit 4 colour (4, a packed dword), bit 5 first texture coordinate (8), bit 6 second (8); terrain/render#vertex-formats lists which formats the terrain code binds. 0x58a7c0(buffer, id) binds a buffer with format id: it sets the attribute mask (0x592a60, which also sets the dirty mask [dev+0x27dc] |= old ^ new), the format id and the stride (0x592aa0).
| id | stride | components |
|---|---|---|
| 0 | 0xc | position |
| 1, 2 | 0x18, 0x1c | position, normal; and colour |
| 3, 4 | 0x20, 0x24 | position, normal, texcoord 0; and colour |
| 5, 6 | 0x28, 0x2c | position, normal, texcoords 0 and 1; and colour |
| 7 | 0x10 | position, colour |
| 8, 9 | 0x18, 0x20 | position, colour, texcoord 0; and texcoord 1 |
| 10, 11 | 0x14, 0x1c | position, texcoord 0; and texcoord 1 |
| 12 | 0x30 | position, 4 bytes, 4 bytes, normal, texcoords 0 and 1 |
The derivation is in the doc.
Callers 39
- GxBuildVertices gx
- CGxDevice::DrawCursor gx
- GxuFontFrame unassigned
- FlushQuads font
- CGUnit_C::DrawBowstring objectlayer
- DrawFishingLine objectlayer
- Rain::DrawPatterFixed lighting
- Rain::DrawDropsFixed lighting
- Rain::DrawPatterShader lighting
- Rain::DrawDropsShader lighting
- Snow::DrawShader lighting
- Snow::DrawFixed lighting
- Sand::DrawFixed lighting
- Sand::DrawShader lighting
- Mists::Render lighting
- CChunkLiquid::DrawOcean terrain
- CChunkLiquid::DrawRiver terrain
- CChunkLiquid::DrawMagma terrain
- DrawDriftCloud terrain
- UpdateRipples terrain
- UpdateFootprints terrain
- UploadDetailDoodadSlot terrain
- BindGroupBuffers terrain
- DrawInteriorGroupLiquid terrain
- DrawExteriorGroupLiquid terrain
- DrawGroupMagma terrain
- CMapAreaLow::Draw terrain
- CMapChunk::SelectMesh terrain
- CMapChunk::DrawFlat terrain
- SWING::Step playername
- PLAYERNAMEDESC::UpdatePlate playername
- WorldTextDrawIcons playername
- WriteDecalVerticesColoured lighting
- WriteDecalVertices lighting
- M2DrawBatchedRun models
- CM2Model::FillVerticesTwoTexCoords models
- CM2Model::FillVertices models
- CM2Shared::CreateVertexBuffer models
- CParticleEmitter2::Render models
Callees 3
- 0x58a790 gx
- 0x58a7b0 gx
- CGxDevice::SetVertexFormat gx
Calls and jumps by a bare address, from tables/calls.tsv.