diff --git a/demos/tutorial/05_easymesh.cpp b/demos/tutorial/05_easymesh.cpp index 8cf71187..7ab6f96c 100644 --- a/demos/tutorial/05_easymesh.cpp +++ b/demos/tutorial/05_easymesh.cpp @@ -55,14 +55,16 @@ public: /* Add a white directional light */ m_light1 = new Light(); - m_light1->SetPosition(vec4(0.2f, 0.2f, 0.f, 0.f)); + m_light1->SetPosition(vec3(0.2f, 0.2f, 0.f)); m_light1->SetColor(vec4(0.5f, 0.5f, 0.5f, 1.f)); + m_light1->SetType(LightType::Directional); Ticker::Ref(m_light1); /* Add an orangeish point light */ m_light2 = new Light(); - m_light2->SetPosition(vec4(-15.f, 15.f, 15.f, 1.f)); + m_light2->SetPosition(vec3(-15.f, 15.f, 15.f)); m_light2->SetColor(vec4(0.4f, 0.3f, 0.2f, 1.f)); + m_light2->SetType(LightType::Point); Ticker::Ref(m_light2); m_ready = false; diff --git a/src/light.h b/src/light.h index 54e6ef6f..08817779 100644 --- a/src/light.h +++ b/src/light.h @@ -16,6 +16,8 @@ #if !defined __LIGHT_H__ #define __LIGHT_H__ +#include /* for FLT_MAX */ + #include "worldentity.h" namespace lol diff --git a/test/btphystest.cpp b/test/btphystest.cpp index c6325006..3884d484 100644 --- a/test/btphystest.cpp +++ b/test/btphystest.cpp @@ -113,14 +113,16 @@ void BtPhysTest::InitApp() /* Add a white directional light */ m_light1 = new Light(); - m_light1->SetPosition(vec4(0.2f, 0.2f, 0.f, 0.f)); + m_light1->SetPosition(vec3(0.2f, 0.2f, 0.f)); m_light1->SetColor(vec4(0.5f, 0.5f, 0.5f, 1.f)); + m_light1->SetType(LightType::Directional); Ticker::Ref(m_light1); /* Add an orangeish point light */ m_light2 = new Light(); - m_light2->SetPosition(vec4(-15.f, 15.f, 15.f, 1.f)); + m_light2->SetPosition(vec3(-15.f, 15.f, 15.f)); m_light2->SetColor(vec4(0.4f, 0.3f, 0.2f, 1.f)); + m_light2->SetType(LightType::Point); Ticker::Ref(m_light2); float offset = 29.5f; diff --git a/test/nacl_phystest.cpp b/test/nacl_phystest.cpp index 64fa674c..5a972e49 100644 --- a/test/nacl_phystest.cpp +++ b/test/nacl_phystest.cpp @@ -59,14 +59,16 @@ Nacl_PhysTest::Nacl_PhysTest(bool editor) /* Add a white directional light */ m_light1 = new Light(); - m_light1->SetPosition(vec4(0.2f, 0.2f, 0.f, 0.f)); + m_light1->SetPosition(vec3(0.2f, 0.2f, 0.f)); m_light1->SetColor(vec4(0.5f, 0.5f, 0.5f, 1.f)); + m_light1->SetType(LightType::Directional); Ticker::Ref(m_light1); /* Add an orangeish point light */ m_light2 = new Light(); - m_light2->SetPosition(vec4(-15.f, 15.f, 15.f, 1.f)); + m_light2->SetPosition(vec3(-15.f, 15.f, 15.f)); m_light2->SetColor(vec4(0.4f, 0.3f, 0.2f, 1.f)); + m_light2->SetType(LightType::Point); Ticker::Ref(m_light2); }