diff options
author | Alex Zolotarev <alex@maps.me> | 2014-10-14 13:14:55 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:30:57 +0300 |
commit | 0ddcff0b07566260e1e00990f70555110fb5cfa7 (patch) | |
tree | 32d542f1b9d9f6dcdc4e800b4ac5b3d6ee62b2c8 /drape_head/testing_engine.cpp | |
parent | 9ad4f6585c45443815b7ab9a691a7c47eefe6012 (diff) |
[msvc][win] Fixed compilation issues
Diffstat (limited to 'drape_head/testing_engine.cpp')
-rw-r--r-- | drape_head/testing_engine.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drape_head/testing_engine.cpp b/drape_head/testing_engine.cpp index 54a69075ac..79a3cb7f17 100644 --- a/drape_head/testing_engine.cpp +++ b/drape_head/testing_engine.cpp @@ -698,21 +698,20 @@ void TestingEngine::ModelViewInit() void TestingEngine::ProjectionInit() { - float left = m_viewport.GetX0(); - float right = left + m_viewport.GetWidth(); - float bottom = m_viewport.GetY0(); - float top = bottom + m_viewport.GetHeight(); - float near = -20000.0f; - float far = 20000.0f; - - float m[4 * 4]; - memset(m, 0, sizeof(m)); + float const left = m_viewport.GetX0(); + float const right = left + m_viewport.GetWidth(); + float const bottom = m_viewport.GetY0(); + float const top = bottom + m_viewport.GetHeight(); + float const nearClip = -20000.0f; + float const farClip = 20000.0f; + + float m[4 * 4] = {0.}; m[0] = 2.0f / (right - left); m[3] = - (right + left) / (right - left); m[5] = 2.0f / (bottom - top); m[7] = - (bottom + top) / (bottom - top); - m[10] = -2.0f / (far - near); - m[11] = - (far + near) / (far - near); + m[10] = -2.0f / (farClip - nearClip); + m[11] = - (farClip + nearClip) / (farClip - nearClip); m[15] = 1.0; m_generalUniforms.SetMatrix4x4Value("projection", m); |