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

Method Reset

engine/PoseidonGL33/EngineGL33_Lifecycle.cpp:476–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476bool EngineGL33::Reset()
477{
478 GL33Bind::Invalidate();
479 InvalidatePipelineCache();
480 if (!_glContext)
481 return false;
482
483 bool inScene = _frameOpen;
484 if (inScene)
485 FinishDraw();
486
487 PreReset(false);
488
489 // Window size may have changed — rebuild the frame target at the new
490 // dimensions before deriving the viewport from it.
491 DestroySSAATarget();
492 ApplyPendingRenderScale();
493 BindFrameRenderTarget();
494
495 int viewportW, viewportH;
496 RenderTargetSize(viewportW, viewportH);
497
498 LOG_DEBUG(Graphics, "GL33: Reset logical={}x{} viewport={}x{}", _w, _h, viewportW, viewportH);
499
500 glViewport(0, 0, viewportW, viewportH);
501
502 PostReset();
503 if (inScene)
504 InitDraw();
505 return true;
506}
507
508void EngineGL33::ResetForRemount()
509{

Callers

nothing calls this directly

Calls 1

InvalidateFunction · 0.85

Tested by

no test coverage detected