Throw a fatal error if we ask a normalmap effect and the underlying mesh doesnt have one.

This commit is contained in:
Vincent Lejeune 2014-01-17 21:15:43 +01:00
parent 620be813eb
commit 8e1d76dd8f

View File

@ -762,6 +762,9 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
IVideoDriver* video_driver = irr_driver->getVideoDriver();
if (irr_driver->isGLSL())
{
if (mb->getVertexType() != video::EVT_TANGENTS)
Log::fatal("material", "Requiring normal map without tangent enabled mesh");
ITexture* tex = irr_driver->getTexture(m_normal_map_tex);
if (m_is_heightmap)
{