| 117 | } |
| 118 | |
| 119 | void NamedTexTarget::getShaderMacros( Vector<GFXShaderMacro> *outMacros ) |
| 120 | { |
| 121 | ConditionerFeature *cond = getConditioner(); |
| 122 | if ( !cond ) |
| 123 | return; |
| 124 | |
| 125 | // TODO: No check for duplicates is |
| 126 | // going on here which might be a problem? |
| 127 | |
| 128 | String targetName = String::ToLower( mName ); |
| 129 | |
| 130 | // Add both the condition and uncondition macros. |
| 131 | const String &condMethod = cond->getShaderMethodName( ConditionerFeature::ConditionMethod ); |
| 132 | if ( condMethod.isNotEmpty() ) |
| 133 | { |
| 134 | GFXShaderMacro macro; |
| 135 | macro.name = targetName + "Condition"; |
| 136 | macro.value = condMethod; |
| 137 | outMacros->push_back( macro ); |
| 138 | } |
| 139 | |
| 140 | const String &uncondMethod = cond->getShaderMethodName( ConditionerFeature::UnconditionMethod ); |
| 141 | if ( uncondMethod.isNotEmpty() ) |
| 142 | { |
| 143 | GFXShaderMacro macro; |
| 144 | macro.name = targetName + "Uncondition"; |
| 145 | macro.value = uncondMethod; |
| 146 | outMacros->push_back( macro ); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | DefineEngineFunction(getNamedTargetList, String, (), , "") |
| 151 | { |
no test coverage detected