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

Method setFeature

Engine/source/shaderGen/featureSet.cpp:112–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void FeatureSet::setFeature( const FeatureType &type, bool set, S32 index )
113{
114 for ( U32 i=0; i < mFeatures.size(); i++ )
115 {
116 const FeatureInfo &info = mFeatures[i];
117 if ( info.type == &type && info.index == index )
118 {
119 if ( set )
120 return;
121 else
122 {
123 mFeatures.erase_fast( i );
124 mDescription.clear();
125 return;
126 }
127 }
128 }
129
130 if ( !set )
131 return;
132
133 FeatureInfo info;
134 info.type = &type;
135 info.index = index;
136 mFeatures.push_back( info );
137
138 mDescription.clear();
139}
140
141void FeatureSet::addFeature( const FeatureType &type, S32 index )
142{

Callers 4

_overrideFeaturesMethod · 0.80
determineFeatureMethod · 0.80
determineFeatureMethod · 0.80

Calls 4

erase_fastMethod · 0.80
sizeMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected