From 19ecc7f890b6a92267c73ede17edb2bc109e8147 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 4 Jul 2012 17:28:22 +0200 Subject: [PATCH] fix performance --- components/nifogre/ogre_nif_loader.cpp | 4 +++- extern/shiny | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index a83a03a176..26a18b6b44 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -228,6 +228,9 @@ void NIFLoader::createMaterial(const String &name, int alphaFlags, float alphaTest, const String &texName) { + if (texName.empty()) + return; + sh::MaterialInstance* instance = sh::Factory::getInstance ().createMaterialInstance (name, "openmw_objects_base"); instance->setProperty ("ambient", sh::makeProperty ( 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)); - /* if (!texName.empty()) { diff --git a/extern/shiny b/extern/shiny index 8d95f53464..6080431c8c 160000 --- a/extern/shiny +++ b/extern/shiny @@ -1 +1 @@ -Subproject commit 8d95f53464a779c7da643228ace02ae28ec6a503 +Subproject commit 6080431c8ce37c6044dd7d1e319de3c7b8adfd69