CGxDeviceOpenGl::BindTexture
function · gx · host
- Address
0x59f0f0· 79 bytes, up to0x59f13e- Signature
void __thiscall (CGxDeviceOpenGl *this, void *texture, uint32_t unit)- Meaning
- Binds a texture's OpenGL name to its target, marking the unit state dirty when the default unit is meant
- Confidence
- verified, proof one
- Finding
- gx/textures#device-texture-upload
Finding: Device texture upload in gx: textures
Slot 0 of the device uploads a texture's levels when the texture is bound or touched: 0x59f5b0 (OpenGL, through 0x59f5d0) and 0x5a0d70 (Direct3D, through 0x5a0a80). Both ask the texture's update callback (+0x44, with the owner at +0x40) for each level: mode 0 begins, mode 1 returns a level's pitch and pixels, mode 2 ends; a texture whose flags have bit 7 set is dynamic and is not uploaded here. The first level uploaded is min([dev+0x31c], levels - 1), so that many top levels are skipped, and each next level has half the size down to 1 by 1.
The derivation is in the doc.
Callers 5
- 0x58d100 gx
- 0x58f270 gx
- CGxDeviceOpenGl::ApplyStageTexture gx
- CGxDeviceOpenGl::UploadTexture gx
- CGxDeviceOpenGl::CopyToTexture gx
Callees 2
Calls and jumps by a bare address, from tables/calls.tsv.