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

Method MaterialManager

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

Source from the content-addressed store, hash-verified

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