TextureSprite Resource that use GL_NEAREST for sampling aswell as some StartMenu changes

This commit is contained in:
Tleety
2016-03-09 17:24:21 +01:00
parent 49040e9c4b
commit 1104166039
21 changed files with 9375 additions and 110 deletions
+9 -9
View File
@@ -10,31 +10,31 @@ Model::Model(std::string fileName)
case RawModel::MaterialType::SingleTextures:
{
RawModel::MaterialSingleTextures* materialSingleTexture = static_cast<RawModel::MaterialSingleTextures*>(materialProperty.material);
materialSingleTexture->ColorMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->ColorMap.TexturePath, false);
materialSingleTexture->NormalMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->NormalMap.TexturePath, false);
materialSingleTexture->SpecularMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->SpecularMap.TexturePath, false);
materialSingleTexture->IncandescenceMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->IncandescenceMap.TexturePath, false);
materialSingleTexture->ColorMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->ColorMap.TexturePath);
materialSingleTexture->NormalMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->NormalMap.TexturePath);
materialSingleTexture->SpecularMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->SpecularMap.TexturePath);
materialSingleTexture->IncandescenceMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSingleTexture->IncandescenceMap.TexturePath);
}
break;
case RawModel::MaterialType::SplatMapping:
{
RawModel::MaterialSplatMapping* materialSplatMapping = static_cast<RawModel::MaterialSplatMapping*>(materialProperty.material);
materialSplatMapping->SplatMap.Texture = CommonFunctions::LoadTexture(materialSplatMapping->SplatMap.TexturePath, false);
materialSplatMapping->SplatMap.Texture = CommonFunctions::TryLoadResource<Texture, false>(materialSplatMapping->SplatMap.TexturePath);
for (auto& texture : materialSplatMapping->ColorMaps)
{
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
}
for (auto& texture : materialSplatMapping->NormalMaps)
{
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
}
for (auto& texture : materialSplatMapping->SpecularMaps)
{
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
}
for (auto& texture : materialSplatMapping->IncandescenceMaps)
{
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = CommonFunctions::TryLoadResource<Texture, false>(texture.TexturePath);
}
}
break;