Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(894)

Unified Diff: source/gameengine/Ketsji/KX_Light.cpp

Issue 5491068: BGE Harmony Branch Base URL: https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Patch Set: Some fixes to sun shadows and other various things. Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: source/gameengine/Ketsji/KX_Light.cpp
===================================================================
--- source/gameengine/Ketsji/KX_Light.cpp (revision 42811)
+++ source/gameengine/Ketsji/KX_Light.cpp (working copy)
@@ -45,6 +45,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "DNA_lamp_types.h"
#include "GPU_material.h"
KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,
@@ -267,6 +268,22 @@
GPU_lamp_shadow_buffer_unbind(lamp);
}
+struct Image *KX_LightObject::GetTextureImage(short texslot)
+{
+ Lamp *la = (Lamp*)GetBlenderObject()->data;
+
+ if (texslot >= MAX_MTEX || texslot < 0)
+ {
+ printf("KX_LightObject::GetTextureImage(): texslot exceeds slot bounds (0-%d)\n", MAX_MTEX-1);
+ return NULL;
+ }
+
+ if (la->mtex[texslot])
+ return la->mtex[texslot]->tex->ima;
+
+ return NULL;
+}
+
#ifdef WITH_PYTHON
/* ------------------------------------------------------------------------- */
/* Python Integration Hooks */

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b