diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-17 08:37:25 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-17 08:37:25 +0400 |
commit | 82c845425f0a5e2805ed7e9f6cb74920fa96229f (patch) | |
tree | 04d6b5fe7db2952b1a402aa2219637b2f4b810f6 /source/gameengine/Ketsji/KX_Light.h | |
parent | 51bca0d7dc8fb5033778796e14dd01c1c7f4355a (diff) |
BGE: Adding partial support for LibLoaded lights with GLSL materials.
Any GLSL materials loaded after lights are LibLoaded will now use the lights in
heir shaders. This includes materials loaded from the same scene as the LibLoaded
lights. We could later add a new flag to LibLoad to recompile all existing shaders,
but this commit should offer a lot more flexibility as is.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Light.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h index f88fc7f6a1b..43421a3faf3 100644 --- a/source/gameengine/Ketsji/KX_Light.h +++ b/source/gameengine/Ketsji/KX_Light.h @@ -37,6 +37,7 @@ struct GPULamp; struct Scene; +struct Base; class KX_Camera; class RAS_IRasterizer; class RAS_IRenderTools; @@ -50,6 +51,7 @@ protected: class RAS_IRenderTools* m_rendertools; //needed for registering and replication of lightobj bool m_glsl; Scene* m_blenderscene; + Base* m_base; public: KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, bool glsl); @@ -69,7 +71,7 @@ public: struct Image *GetTextureImage(short texslot); void Update(); - void UpdateScene(class KX_Scene *kxscene) {m_lightobj.m_scene = (void*)kxscene;} + void UpdateScene(class KX_Scene *kxscene); virtual int GetGameObjectType() { return OBJ_LIGHT; } |