MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ResetForRemount

Method ResetForRemount

engine/PoseidonGL33/EngineGL33_Lifecycle.cpp:508–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void EngineGL33::ResetForRemount()
509{
510 GL33Bind::Invalidate();
511 InvalidatePipelineCache();
512 // A mod re-mount only changes *content*, not GL infrastructure. Flush any
513 // queued draws and release the GPU textures tied to the old banks — the new
514 // mod set's textures reload on demand. Shaders, vertex buffers and sampler
515 // state are engine-level (not mod content) and MUST stay intact: a full
516 // ResetHard tears them down and leaves the VS material-constant binding null
517 // for the first post-reload draw (UploadVSMaterialConstants then faults).
518 FreeAllQueues(_queueNo);
519 if (_textBank)
520 {
521 _textBank->ReleaseAllTextures();
522 }
523}
524
525bool EngineGL33::ResetHard()
526{

Callers 1

RemountMethod · 0.45

Calls 2

InvalidateFunction · 0.85
ReleaseAllTexturesMethod · 0.45

Tested by

no test coverage detected