Added default statement in switch on material types

This commit is contained in:
Elderme 2016-01-31 21:49:22 +01:00
parent 1e7e126b55
commit 20290decc0
2 changed files with 48 additions and 5 deletions

View File

@ -197,6 +197,24 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
case Material::SHADERTYPE_SPLATTING: case Material::SHADERTYPE_SPLATTING:
ListMatSplatting::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix); ListMatSplatting::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix);
break; break;
case Material::SHADERTYPE_ALPHA_BLEND:
break;
case Material::SHADERTYPE_ADDITIVE:
break;
case Material::SHADERTYPE_VEGETATION:
break;
case Material::SHADERTYPE_WATER:
break;
case Material::SHADERTYPE_SPHERE_MAP:
break;
case Material::SHADERTYPE_NORMAL_MAP:
break;
case Material::SHADERTYPE_DETAIL_MAP:
break;
default:
Log::warn("DrawCalls", "Unknown material type: %d", Mat);
} }
} }
} }
@ -234,6 +252,16 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
case Material::SHADERTYPE_VEGETATION: case Material::SHADERTYPE_VEGETATION:
ListMatGrass::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, m_wind_dir); ListMatGrass::getInstance()->SolidPass.emplace_back(mesh, ModelMatrix, InvModelMatrix, m_wind_dir);
break; break;
case Material::SHADERTYPE_ALPHA_BLEND:
break;
case Material::SHADERTYPE_ADDITIVE:
break;
case Material::SHADERTYPE_WATER:
break;
default:
Log::warn("DrawCalls", "Unknown material type: %d", Mat);
} }
} }
} }
@ -287,6 +315,16 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
break; break;
case Material::SHADERTYPE_VEGETATION: case Material::SHADERTYPE_VEGETATION:
ListMatGrass::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, m_wind_dir); ListMatGrass::getInstance()->Shadows[cascade].emplace_back(mesh, ModelMatrix, InvModelMatrix, m_wind_dir);
case Material::SHADERTYPE_ALPHA_BLEND:
break;
case Material::SHADERTYPE_ADDITIVE:
break;
case Material::SHADERTYPE_WATER:
break;
default:
Log::warn("DrawCalls", "Unknown material type: %d", Mat);
} }
} }
} }
@ -350,6 +388,16 @@ void DrawCalls::handleSTKCommon(scene::ISceneNode *Node,
case Material::SHADERTYPE_VEGETATION: case Material::SHADERTYPE_VEGETATION:
ListMatGrass::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, m_wind_dir); ListMatGrass::getInstance()->RSM.emplace_back(mesh, ModelMatrix, InvModelMatrix, m_wind_dir);
break; break;
case Material::SHADERTYPE_ALPHA_BLEND:
break;
case Material::SHADERTYPE_ADDITIVE:
break;
case Material::SHADERTYPE_WATER:
break;
default:
Log::warn("DrawCalls", "Unknown material type: %d", Mat);
} }
} }
} }

View File

@ -631,9 +631,6 @@ public:
}; // InstancedDetailedObjectPass2Shader }; // InstancedDetailedObjectPass2Shader
// ============================================================================ // ============================================================================
struct DefaultMaterial struct DefaultMaterial
{ {
@ -809,6 +806,4 @@ struct SplattingMat
static const STK::Tuple<size_t, size_t, size_t, size_t, size_t> RSMTextures; static const STK::Tuple<size_t, size_t, size_t, size_t, size_t> RSMTextures;
}; // SplattingMat }; // SplattingMat
#endif //HEADER_MATERIAL_TYPE_HPP #endif //HEADER_MATERIAL_TYPE_HPP