4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
32 #include "RAS_LightObject.h"
33 #include "KX_GameObject.h"
38 class RAS_IRasterizer;
39 class RAS_IRenderTools;
42 class KX_LightObject : public KX_GameObject
46 RAS_LightObject m_lightobj;
47 class RAS_IRenderTools* m_rendertools; //needed for registering and replication of lightobj
49 Scene* m_blenderscene;
52 KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, bool glsl);
53 virtual ~KX_LightObject();
54 virtual CValue* GetReplica();
55 RAS_LightObject* GetLightData() { return &m_lightobj;}
58 bool ApplyLight(KX_Scene *kxscene, int oblayer, int slot);
61 struct GPULamp *GetGPULamp();
62 bool HasShadowBuffer();
64 void BindShadowBuffer(class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform& camtrans);
65 void UnbindShadowBuffer(class RAS_IRasterizer *ras);
69 static PyObject* pyattr_get_color(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
70 static int pyattr_set_color(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject* value);
71 static PyObject* pyattr_get_typeconst(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
72 static PyObject* pyattr_get_type(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
73 static int pyattr_set_type(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject* value);
75 virtual bool IsLight(void) { return true; }