From d333e08343df9efba3a95909190d80a00806c50c Mon Sep 17 00:00:00 2001 From: Gargaj Date: Thu, 28 Aug 2014 16:27:29 +0200 Subject: [PATCH] add ambient light type, allow collada to load it --- code/ColladaHelper.h | 1 - code/ColladaLoader.cpp | 4 ---- include/assimp/light.h | 6 ++++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/ColladaHelper.h b/code/ColladaHelper.h index 956665198..f249a28d5 100644 --- a/code/ColladaHelper.h +++ b/code/ColladaHelper.h @@ -118,7 +118,6 @@ struct Camera float mZNear, mZFar; }; -#define aiLightSource_AMBIENT 0xdeaddead #define ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET 1e9f /** A collada light source. */ diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index e721c99b8..26d41862d 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -308,10 +308,6 @@ void ColladaLoader::BuildLightsForNode( const ColladaParser& pParser, const Coll continue; } const Collada::Light* srcLight = &srcLightIt->second; - if (srcLight->mType == aiLightSource_AMBIENT) { - DefaultLogger::get()->error("Collada: Skipping ambient light for the moment"); - continue; - } // now fill our ai data structure aiLight* out = new aiLight(); diff --git a/include/assimp/light.h b/include/assimp/light.h index 6b01c2878..ec0c20ec5 100644 --- a/include/assimp/light.h +++ b/include/assimp/light.h @@ -75,6 +75,12 @@ enum aiLightSourceType //! sport arenas. aiLightSource_SPOT = 0x3, + //! The generic light level of the world, including the bounces + //! of all other lightsources. + //! This light type doesn't have a valid position, direction, or + //! other properties, just a color. + aiLightSource_AMBIENT = 0x4, + /** This value is not used. It is just there to force the * compiler to map this enum to a 32 Bit integer.