Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2009-12-31 21:51:02 +0300
committerDalai Felinto <dfelinto@gmail.com>2009-12-31 21:51:02 +0300
commit09994fb444bccbccdd7399fe414b4d7a49c773c2 (patch)
tree22a96fdfb5351854a01da8b7a62f9e5fe682a46d /source/gameengine
parentb800fbd13fe5fc3492569e7c70b4ae6117c5c109 (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/gameengine')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp21
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);