From 7de466cac471e1b52b3b6957136f79b1128d1054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=E2=80=98Touky=E2=80=99=20Huet?= Date: Wed, 25 Sep 2013 21:29:31 +0000 Subject: [PATCH] removed EasyMesh invalid Uniform setup for emscripten correct operating. --- src/easymesh/easymesh.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/easymesh/easymesh.cpp b/src/easymesh/easymesh.cpp index 4ac61aca..79c5f78a 100644 --- a/src/easymesh/easymesh.cpp +++ b/src/easymesh/easymesh.cpp @@ -121,7 +121,7 @@ DefaultShaderData::DefaultShaderData(uint16_t vert_decl_flags, Shader* shader, b void DefaultShaderData::SetupDefaultData(bool with_UV) { AddUniform("in_ModelView"); - AddUniform("in_Inv_ModelView"); + //AddUniform("in_Inv_ModelView"); AddUniform("in_View"); AddUniform("in_Inv_View"); AddUniform("in_Proj"); @@ -150,12 +150,13 @@ void DefaultShaderData::SetupShaderDatas(mat4 const &model) m_shader->SetUniform(*GetUniform("u_Lights"), light_data); m_shader->SetUniform(*GetUniform("in_ModelView"), modelview); - m_shader->SetUniform(*GetUniform("in_Inv_ModelView"), inverse(modelview)); + //m_shader->SetUniform(*GetUniform("in_Inv_ModelView"), inverse(modelview)); m_shader->SetUniform(*GetUniform("in_View"), view); m_shader->SetUniform(*GetUniform("in_Inv_View"), inverse(view)); m_shader->SetUniform(*GetUniform("in_Proj"), proj); m_shader->SetUniform(*GetUniform("in_NormalMat"), normalmat); - m_shader->SetUniform(*GetUniform("in_Damage"), 0); + float f = 0.f; + m_shader->SetUniform(*GetUniform("in_Damage"), f); } //-----------------------------------------------------------------------------