fix performance

pull/21/head
scrawl 13 years ago
parent f8e3213996
commit 19ecc7f890

@ -228,6 +228,9 @@ void NIFLoader::createMaterial(const String &name,
int alphaFlags, float alphaTest, int alphaFlags, float alphaTest,
const String &texName) const String &texName)
{ {
if (texName.empty())
return;
sh::MaterialInstance* instance = sh::Factory::getInstance ().createMaterialInstance (name, "openmw_objects_base"); sh::MaterialInstance* instance = sh::Factory::getInstance ().createMaterialInstance (name, "openmw_objects_base");
instance->setProperty ("ambient", sh::makeProperty<sh::Vector3> ( instance->setProperty ("ambient", sh::makeProperty<sh::Vector3> (
new sh::Vector3(ambient.array[0], ambient.array[1], ambient.array[2]))); new sh::Vector3(ambient.array[0], ambient.array[1], ambient.array[2])));
@ -243,7 +246,6 @@ void NIFLoader::createMaterial(const String &name,
instance->setProperty ("diffuseMap", sh::makeProperty(texName)); instance->setProperty ("diffuseMap", sh::makeProperty(texName));
/* /*
if (!texName.empty()) if (!texName.empty())
{ {

2
extern/shiny vendored

@ -1 +1 @@
Subproject commit 8d95f53464a779c7da643228ace02ae28ec6a503 Subproject commit 6080431c8ce37c6044dd7d1e319de3c7b8adfd69
Loading…
Cancel
Save