CGxDeviceOpenGl::SetCachedState
function · gx · orchestration
- Address
0x59baa0· 1422 bytes, up to0x59c02d- Signature
void __thiscall (CGxDeviceOpenGl *this, uint32_t index, uint32_t value, uint32_t force)- Meaning
- Issues an OpenGL state call for one internal index when the value differs from the shadow copy or force is set
- Confidence
- verified, proof one
- Finding
- gx/renderstate#render-state-ids
- Test
gx::scale_neg_65536_matches_binary
Finding: Render state ids in gx: render state
Both applicators read the id and act as below; a state the table gives to the cache only is applied by a later flush.
| ids | state |
|---|---|
| 0 | depth bias value (Depth bias) |
| 1, 2, 3, 4 | material: ambient and diffuse colour, emissive colour, specular colour, specular power |
| 5 | normalise normals |
| 6 | global ambient colour |
| 7, 8 | blend mode 0 to 10; alpha reference |
| 9 to 13 | fog mode (0 linear, 1 exp, 2 exp2), start, end, density, colour |
| 14 to 17 | lighting on; fog on; depth test on; depth function 0 to 3 |
| 18, 19 | depth write; colour write mask (4 bits) |
| 20 to 22 | cull on; clip plane mask (6 bits); multisample on |
0x17 to 0x1e | texture of stage id - 0x17 |
0x1f to 0x26 | combine preset of stage id - 0x1f |
0x27 to 0x2e | mip bias of the stage (float) |
The derivation is in the doc.
Callers 22
- CGxDeviceOpenGl::CreatePoolAPI gx
- 0x58e900 gx
- CGxDeviceOpenGl::PoolSizeSet gx
- CGxDeviceOpenGl::LockBuffer gx
- CGxDeviceOpenGl::WriteBuffer gx
- CGxDeviceOpenGl::Clear gx
- CGxDeviceOpenGl::FlushAttributes gx
- 0x59c610 gx
- 0x59ca60 gx
- CGxDeviceOpenGl::InitState gx
- CGxDeviceOpenGl::ApplyStageTexture gx
- CGxDeviceOpenGl::ApplyCombinePreset gx
- CGxDeviceOpenGl::ApplyMipBias gx
- CGxDeviceOpenGl::ApplyTexCoordMode gx
- CGxDeviceOpenGl::ApplyRenderState gx
- 0x59e2e0 gx
- CGxDeviceOpenGl::ApplyPixelProgram gx
- CGxDeviceOpenGl::ApplyVertexProgram gx
- 0x59ece0 gx
- CGxDeviceOpenGl::BindTexture gx
- CGxDeviceOpenGl::LoadProjection gx
- CGxDeviceOpenGl::LoadViewMatrix gx
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.