| 53 | |
| 54 | |
| 55 | MaterialManager::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 | |
| 95 | MaterialManager::~MaterialManager() |
| 96 | { |
nothing calls this directly
no test coverage detected