diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2009-12-31 21:51:02 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2009-12-31 21:51:02 +0300 |
commit | 09994fb444bccbccdd7399fe414b4d7a49c773c2 (patch) | |
tree | 22a96fdfb5351854a01da8b7a62f9e5fe682a46d /source | |
parent | b800fbd13fe5fc3492569e7c70b4ae6117c5c109 (diff) |
BGE: negative lamp last fix - Texture Face. I'm going to commit it to 2.49 too.
The files I used for test are here: http://blenderecia.orgfree.com/blender/tmp/neg_light.zip
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 0ace7e03c32..a54c229593f 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1633,16 +1633,17 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l lightobj.m_nodiffuse = (la->mode & LA_NO_DIFF) != 0; lightobj.m_nospecular = (la->mode & LA_NO_SPEC) != 0; -/* - NEGATIVE LAMP only supported in GLSL mode, and handled inside the lamp update function - code commented out now, to be removed or extended to multitexture mode - if (la->mode & LA_NEG) - { - lightobj.m_red = -lightobj.m_red; - lightobj.m_green = -lightobj.m_green; - lightobj.m_blue = -lightobj.m_blue; + bool glslmat = converter->GetGLSLMaterials(); + + // in GLSL NEGATIVE LAMP is handled inside the lamp update function + if(glslmat==0) { + if (la->mode & LA_NEG) + { + lightobj.m_red = -lightobj.m_red; + lightobj.m_green = -lightobj.m_green; + lightobj.m_blue = -lightobj.m_blue; + } } -*/ if (la->type==LA_SUN) { lightobj.m_type = RAS_LightObject::LIGHT_SUN; @@ -1653,7 +1654,7 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l } gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, - lightobj, converter->GetGLSLMaterials()); + lightobj, glslmat); BL_ConvertLampIpos(la, gamelight, converter); |