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:
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_FontObject.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h2
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp4
4 files changed, 10 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp
index 420f1f7eb98..366da3fc074 100644
--- a/source/gameengine/Ketsji/KX_FontObject.cpp
+++ b/source/gameengine/Ketsji/KX_FontObject.cpp
@@ -194,7 +194,9 @@ void KX_FontObject::DrawFontText()
/* Get a working copy of the OpenGLMatrix to use */
double mat[16];
- memcpy(mat, this->GetOpenGLMatrix(), sizeof(double)*16);
+ for (unsigned short i = 0; i < 16; ++i) {
+ mat[i] = m_OpenGL_4x4Matrix.getPointer()[i];
+ }
/* Account for offset */
MT_Vector3 offset = this->NodeGetWorldOrientation() * m_offset * this->NodeGetWorldScaling();
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 014d00a07d7..cbd4e3dc4b7 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -700,10 +700,10 @@ void KX_GameObject::ApplyRotation(const MT_Vector3& drot,bool local)
/**
* GetOpenGL Matrix, returns an OpenGL 'compatible' matrix
*/
-double* KX_GameObject::GetOpenGLMatrix()
+float* KX_GameObject::GetOpenGLMatrix()
{
// todo: optimize and only update if necessary
- double* fl = m_OpenGL_4x4Matrix.getPointer();
+ float* fl = m_OpenGL_4x4Matrix.getPointer();
if (GetSGNode()) {
MT_Transform trans;
@@ -742,7 +742,7 @@ void KX_GameObject::AddMeshUser()
m_meshes[i]->AddMeshUser(this, &m_meshSlots, GetDeformer());
}
// set the part of the mesh slot that never change
- double* fl = GetOpenGLMatrixPtr()->getPointer();
+ float* fl = GetOpenGLMatrixPtr()->getPointer();
SG_QList::iterator<RAS_MeshSlot> mit(m_meshSlots);
// RAS_MeshSlot* ms;
@@ -2768,7 +2768,7 @@ PyObject *KX_GameObject::pyattr_get_localTransform(void *self_v, const KX_PYATTR
{
KX_GameObject* self = static_cast<KX_GameObject*>(self_v);
- double mat[16];
+ float mat[16];
MT_Transform trans;
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index b5190a56c4a..a2f127d54c8 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -175,7 +175,7 @@ public:
* side effect of storing the result internally. The
* memory for the matrix remains the property of this class.
*/
- double *
+ float *
GetOpenGLMatrix(
);
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index abf6b639fef..f616b287d8b 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1557,9 +1557,9 @@ void KX_Scene::CalculateVisibleMeshes(RAS_IRasterizer* rasty,KX_Camera* cam, int
planes[5].setValue(cplanes[3].getValue()); // bottom
CullingInfo info(layer);
- double mvmat[16] = {0};
+ float mvmat[16] = {0};
cam->GetModelviewMatrix().getValue(mvmat);
- double pmat[16] = {0};
+ float pmat[16] = {0};
cam->GetProjectionMatrix().getValue(pmat);
dbvt_culling = m_physicsEnvironment->CullingTest(PhysicsCullingCallback,&info,planes,5,m_dbvt_occlusion_res,