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

Method InitTexture

Engine/source/environment/VolumetricFog.cpp:1216–1233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1214//-----------------------------------------------------------------------------
1215
1216void VolumetricFog::InitTexture()
1217{
1218 mIsTextured = false;
1219
1220 if (mTextureAsset.isNull())
1221 return;
1222
1223 if (!mTexture.isNull())
1224 {
1225 mIsTextured = true;
1226
1227 F32 width = (F32)mPlatformWindow->getClientExtent().x;
1228 F32 height = (F32)mPlatformWindow->getClientExtent().y;
1229
1230 mTexScale.x = 2.0f - ((F32)mTexture.getWidth() / width);
1231 mTexScale.y = 2.0f - ((F32)mTexture.getHeight() / height);
1232 }
1233}
1234
1235void VolumetricFog::setFogColor(LinearColorF color)
1236{

Callers

nothing calls this directly

Calls 4

isNullMethod · 0.45
getClientExtentMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected