benilla-re systems structs docs

CGxDeviceOpenGl::PrimRender

function · gx · host

Address
0x59fc90 · 332 bytes, up to 0x59fddb
Signature
void __thiscall (CGxDeviceOpenGl *this, const void *descs, uint32_t count, uint32_t indexed)
Meaning
Draws primitive records with glDrawArrays, glDrawRangeElements or glDrawElements after the state flush
Confidence
verified, proof one
Finding
gx/draw#draw-call

Finding: Draw call in gx: drawing

0x58a810(descs, count, indexed) loads the device and calls slot +0x78 with the same arguments; 0x58a830(descs, indexed) draws one record. Slot +0x78 is CGxDeviceOpenGl::PrimRender (0x59fc90) or CGxDeviceD3d::PrimRender (0x5a0f50). Each record is 16 bytes: +0 topology (0 points, 1 lines, 2 line strip, 3 triangles, 4 triangle strip, 5 triangle fan), +4 first vertex or start index, +8 u16 count, +0xa u16 minimum index, +0xc u16 maximum index, +0xe unused. Both refuse to draw and log invalid buf! unless every stream the attribute mask names, and for an indexed draw the index buffer at [dev+0x27ec], is a created and valid buffer (bytes +0x1c and +0x1d non-zero).

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.