CGxDevice::AddVertex
function · gx · primitive
- Address
0x592cf0· 584 bytes, up to0x592f37- Signature
void __thiscall (CGxDevice *this, const float *position)- Meaning
- Appends an immediate-mode vertex with the current attributes, flushing at the primitive limit
- Confidence
- verified, proof one
- Finding
- gx/slots#transform-and-immediate-slots
Finding: Transform and immediate slots in gx: the device's virtual slots
The transform slots store the matrix in the base and load it in the backend. The immediate slots
collect vertices one call at a time; their facade wrappers, 0x58a840 to 0x58a900, are
unreached.
| slot | name | base | OpenGl | Direct3D | does |
|---|---|---|---|---|---|
+0x70 | SetProjection | 0x5925e0 | 0x5a0140 | 0x5a11d0 | stores the projection at +0xf50 and loads it |
+0x74 | SetView | 0x592610 | 0x5a0160 | 0x5a1450 | stores the view; OpenGL marks the model-view and lights stale |
+0x78 | PrimRender | 0x592b00 | 0x59fc90 | 0x5a0f50 | draws primitive records; the base counts them (draw.md) |
+0x7c | BeginPrimitive | 0x592c40 | base | base | starts a primitive of a type at +0xac and clears the vertex arrays |
+0x80 | EndPrimitive | 0x592fd0 | base | base | builds a vertex buffer of the vertices and draws them |
+0x84 | AddVertex | 0x592cf0 | base | base | appends a position with the current colour, normal and coordinates |
+0x88 | SetVertexTexCoord | 0x592f90 | base | base | sets the coordinate pair of a unit, +0xc8 + 8 * unit |
+0x8c | SetVertexNormal | 0x592f40 | base | base | sets the normal, +0x108 |
+0x90 | SetVertexColor | 0x592f70 | base | base | sets the colour, +0x114 |
+0x94 | SetPointSize | 0x597b00 | 0x59fde0 | base | calls glPointSize; the base does nothing |
+0x98 | SetLineWidth | 0x597b10 | 0x59fe00 | base | calls glLineWidth; the base does nothing |
+0x9c | SetCap | 0x593620 | base | base | sets a capability bit (renderstate.md) |
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 13
- SplatVector3 loadingscreen
- GrowArrayBy526930 ui
- GxPrimitiveCount gx
- 0x596930 gx
- 0x596f90 gx
- 0x596fd0 gx
- 0x596ff0 gx
- 0x597090 gx
- 0x5970d0 gx
- 0x5970f0 gx
- 0x597180 gx
- 0x5971c0 gx
- 0x5971e0 gx
Calls and jumps by a bare address, from tables/calls.tsv.