diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-12-14 05:19:45 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2015-12-15 06:28:12 +0300 |
commit | 87fac9a81623d4856e5325718501423abfbcbbe5 (patch) | |
tree | ee27d9e847d5038e31c318a9618a161c0966f4ae /source/gameengine | |
parent | 17a16b57df2d6e45c2f9e0d937c7baf8a386764b (diff) |
use float (not double) for font matrix
Following up on recent double --> float commits in the game engine.
Diffstat (limited to 'source/gameengine')
4 files changed, 4 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 13a5ec6c411..32ac8c594d2 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -193,11 +193,7 @@ void KX_FontObject::DrawFontText() const float aspect = m_fsize / size; /* Get a working copy of the OpenGLMatrix to use */ - double mat[16]; - float *origmat = GetOpenGLMatrix(); - for (unsigned short i = 0; i < 16; ++i) { - mat[i] = (double)origmat[i]; - } + float *mat = GetOpenGLMatrix(); /* Account for offset */ MT_Vector3 offset = this->NodeGetWorldOrientation() * m_offset * this->NodeGetWorldScaling(); diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h index aa32f625475..a92b87773c7 100644 --- a/source/gameengine/Rasterizer/RAS_IRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h @@ -446,7 +446,7 @@ public: */ virtual void RenderText3D( int fontid, const char *text, int size, int dpi, - const float color[4], const double mat[16], float aspect) = 0; + const float color[4], const float mat[16], float aspect) = 0; /** * Renders 2D text string. diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp index e7b5bebd5e8..604b6a6b59b 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp @@ -1504,7 +1504,7 @@ void RAS_OpenGLRasterizer::RenderBox2D(int xco, void RAS_OpenGLRasterizer::RenderText3D( int fontid, const char *text, int size, int dpi, - const float color[4], const double mat[16], float aspect) + const float color[4], const float mat[16], float aspect) { /* gl prepping */ DisableForText(); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h index d6b2c3c8a30..4c22d1de611 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h @@ -297,7 +297,7 @@ public: void RenderBox2D(int xco, int yco, int width, int height, float percentage); void RenderText3D(int fontid, const char *text, int size, int dpi, - const float color[4], const double mat[16], float aspect); + const float color[4], const float mat[16], float aspect); void RenderText2D(RAS_TEXT_RENDER_MODE mode, const char *text, int xco, int yco, int width, int height); |