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

Method MaterialManager

Engine/source/materials/materialManager.cpp:55–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55MaterialManager::MaterialManager()
56{
57 VECTOR_SET_ASSOCIATION( mMatInstanceList );
58
59 mDt = 0.0f;
60 mAccumTime = 0.0f;
61 mLastTime = 0;
62 mDampness = 0.0f;
63 mWarningInst = NULL;
64
65 GFXDevice::getDeviceEventSignal().notify( this, &MaterialManager::_handleGFXEvent );
66
67 // Make sure we get activation signals
68 // and that we're the last to get them.
69 LightManager::smActivateSignal.notify( this, &MaterialManager::_onLMActivate, 9999 );
70
71 mMaterialSet = NULL;
72
73 mUsingDeferred = false;
74
75 mFlushAndReInit = false;
76
77 mDefaultAnisotropy = 1;
78 Con::addVariable( "$pref::Video::defaultAnisotropy", TypeS32, &mDefaultAnisotropy,
79 "@brief Global variable defining the default anisotropy value.\n\n"
80 "Controls the default anisotropic texture filtering level for all materials, including the terrain. "
81 "This value can be changed at runtime to see its affect without reloading.\n\n "
82 "@ingroup Materials");
83 Con::NotifyDelegate callabck( this, &MaterialManager::_updateDefaultAnisotropy );
84 Con::addVariableNotify( "$pref::Video::defaultAnisotropy", callabck );
85
86 Con::NotifyDelegate callabck2( this, &MaterialManager::_onDisableMaterialFeature );
87 Con::setVariable( "$pref::Video::disableNormalMapping", "false" );
88 Con::addVariableNotify( "$pref::Video::disableNormalMapping", callabck2 );
89 Con::setVariable( "$pref::Video::disableCubemapping", "false" );
90 Con::addVariableNotify( "$pref::Video::disableCubemapping", callabck2 );
91 Con::setVariable( "$pref::Video::enableParallaxMapping", "true" );
92 Con::addVariableNotify( "$pref::Video::enableParallaxMapping", callabck2 );
93}
94
95MaterialManager::~MaterialManager()
96{

Callers

nothing calls this directly

Calls 4

addVariableFunction · 0.85
addVariableNotifyFunction · 0.85
setVariableFunction · 0.85
notifyMethod · 0.45

Tested by

no test coverage detected