Просмотр исходного кода

Gpu programs now get loaded properly before initializing material

Marko Pintera 13 лет назад
Родитель
Сommit
c49ed432df

+ 1 - 1
CamelotRenderer/Include/CmResourceHandle.h

@@ -148,7 +148,7 @@ namespace CamelotEngine
 		// (Why not just directly convert to bool? Because then we can assign pointer to bool and that's weird)
 		operator int CM_Bool_struct<T>::*() const
 		{
-			return ((isLoaded() && (mData->mPtr.get() != 0)) ? &CM_Bool_struct<T>::_Member : 0);
+			return (((mData->mPtr != nullptr)) ? &CM_Bool_struct<T>::_Member : 0);
 		}
 	};
 

+ 5 - 0
CamelotRenderer/Source/CmGpuProgramParams.cpp

@@ -739,6 +739,11 @@ namespace CamelotEngine
 			if(mTextures[def->physicalIndex] == nullptr)
 				mTextures[def->physicalIndex] = GpuTextureEntryPtr(new GpuTextureEntry());
 
+			if(val == nullptr)
+			{
+				int a = 5;
+			}
+
 			mTextures[def->physicalIndex]->texture = val;
 		}
 	}