diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-01-06 06:46:54 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-01-06 06:46:54 +0300 |
commit | 2e6d57618232b8b4ce8e5afe84fd278041cbbbfe (patch) | |
tree | c0f05e6b59aada420dd600f1138e9149b97d9e9d /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | ef520a8cc9e863aa234be0ee60d1038e7ec8fc44 (diff) |
Sorry to break the cvs-closed status, so if you really need to make a new 2.40 build, just disable the game engine if it doesn't compile for a platform. Again, sorry if this breaks non-windows platforms, but I hope people help to get this amazing fix working for all platforms. Armature-fixing contribution from Snailrose. Also lots of cool things from Snailrose and Lagan.
Armatures are back
Split screen
Double sided lightning
Ambient lighting
Alpha test
Material IPO support (one per object atm)
Blender materials
GLSL shaders - Python access
Up to three texture samplers from the material panel ( 2D & Cube map )
Python access to a second set of uv coordinates
See http://www.elysiun.com/forum/viewtopic.php?t=58057
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 93917151932..42e5d550e57 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -50,6 +50,7 @@ typedef unsigned long uint_ptr; #define KX_INERTIA_INFINITE 10000 #include "RAS_IPolygonMaterial.h" +#include "KX_BlenderMaterial.h" #include "KX_GameObject.h" #include "RAS_MeshObject.h" #include "KX_MeshProxy.h" @@ -367,6 +368,34 @@ void KX_GameObject::UpdateIPO(float curframetime, UpdateTransform(); } +// IPO update +void +KX_GameObject::UpdateMaterialData( + MT_Vector4 rgba, + MT_Vector3 specrgb, + MT_Scalar hard, + MT_Scalar spec, + MT_Scalar ref, + MT_Scalar emit, + MT_Scalar alpha + + ) +{ + int mesh = 0; + if (((unsigned int)mesh < m_meshes.size()) && mesh >= 0) { + RAS_MaterialBucket::Set::iterator mit = m_meshes[mesh]->GetFirstMaterial(); + for(; mit != m_meshes[mesh]->GetLastMaterial(); ++mit) + { + RAS_IPolyMaterial* poly = (*mit)->GetPolyMaterial(); + if(poly->GetFlag() & RAS_BLENDERMAT ) + { + SetObjectColor(rgba); + KX_BlenderMaterial *m = static_cast<KX_BlenderMaterial*>(poly); + m->UpdateIPO(rgba, specrgb,hard,spec,ref,emit, alpha); + } + } + } +} bool KX_GameObject::GetVisible( void @@ -605,7 +634,6 @@ PyMethodDef KX_GameObject::Methods[] = { {"getMesh", (PyCFunction)KX_GameObject::sPyGetMesh,METH_VARARGS}, {"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_VARARGS}, KX_PYMETHODTABLE(KX_GameObject, getDistanceTo), - {NULL,NULL} //Sentinel }; @@ -937,7 +965,7 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, PyObject* kwds) { int mesh = 0; - + if (PyArg_ParseTuple(args, "|i", &mesh)) { if (((unsigned int)mesh < m_meshes.size()) && mesh >= 0) @@ -950,7 +978,6 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, } - PyObject* KX_GameObject::PyApplyImpulse(PyObject* self, PyObject* args, PyObject* kwds) |