Ver código fonte

Update featureSet.cpp

marauder2k7 7 meses atrás
pai
commit
ac909e26bd
1 arquivos alterados com 8 adições e 5 exclusões
  1. 8 5
      Engine/source/shaderGen/featureSet.cpp

+ 8 - 5
Engine/source/shaderGen/featureSet.cpp

@@ -148,12 +148,15 @@ void FeatureSet::setFeature( const FeatureType &type, bool set, S32 index )
 
 
 void FeatureSet::addFeature( const FeatureType &type, S32 index, void* argStruct )
 void FeatureSet::addFeature( const FeatureType &type, S32 index, void* argStruct )
 {
 {
-   for ( U32 i=0; i < mFeatures.size(); i++ )
+   if (!argStruct)
    {
    {
-      const FeatureInfo &info = mFeatures[i];
-      if (  info.type == &type && 
-            info.index == index )
-         return;
+      for (U32 i = 0; i < mFeatures.size(); i++)
+      {
+         const FeatureInfo& info = mFeatures[i];
+         if (info.type == &type &&
+            info.index == index)
+            return;
+      }
    }
    }
 
 
    FeatureInfo info;
    FeatureInfo info;