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

Method setTexture

Engine/source/postFx/postEffect.cpp:1635–1651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1633}
1634
1635void PostEffect::setTexture( U32 index, const String &texFilePath )
1636{
1637 // Set the new texture name.
1638 mTextureName[index] = texFilePath;
1639 mTexture[index].free();
1640
1641 // Skip empty stages or ones with variable or target names.
1642 if ( texFilePath.isEmpty() ||
1643 texFilePath[0] == '$' ||
1644 texFilePath[0] == '#' )
1645 return;
1646
1647 mTextureProfile[index] = (mTexSRGB[index])? &PostFxTextureSRGBProfile : &PostFxTextureProfile;
1648 _setTexture(texFilePath, index);
1649
1650 mTextureType[index] = NormalTextureType;
1651}
1652
1653void PostEffect::setTexture(U32 index, const GFXTexHandle& texHandle)
1654{

Callers 3

_setupTextureMethod · 0.45
postEffect.cppFile · 0.45
getRenderModelTextureMethod · 0.45

Calls 4

EmptyStringMethod · 0.80
freeMethod · 0.45
isEmptyMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected