MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / handleResize

Method handleResize

Engine/source/environment/VolumetricFog.cpp:318–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void VolumetricFog::handleResize(VolumetricFogRTManager *RTM, bool resize)
319{
320 if (resize)
321 {
322 mResizing = true;
323 RTM->FogAnswered();
324 }
325 else
326 mResizing = false;
327
328 if (mIsTextured)
329 {
330 F32 width = (F32)mPlatformWindow->getClientExtent().x;
331 F32 height = (F32)mPlatformWindow->getClientExtent().y;
332
333 mTexScale.x = 2.0f - ((F32)mTexture.getWidth() / width);
334 mTexScale.y = 2.0f - ((F32)mTexture.getHeight() / height);
335 }
336
337 UpdateBuffers(0,true);
338}
339
340//-----------------------------------------------------------------------------
341// Loadshape extracted from TSMesh and TSShapeInstance

Callers

nothing calls this directly

Calls 4

FogAnsweredMethod · 0.80
getClientExtentMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected