Skip to content

Commit

Permalink
Lighning-dumping implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
Phosfor committed Aug 29, 2010
1 parent 022b072 commit 913138d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/pong-cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class GameState : public State
public:
void init() {
MakeCamera("MainCamera")->loadFromFile("Entities/MainCamera.info")->dump();
MakeLight("DirectionalLight");
MakeLight("DirectionalLight")->dump();
MakeObject("ErrorObject")->loadFromFile("Entities/ErrorObject.info")->dump();
MakeObject("TestLight")->loadFromFile("Entities/Light.info")->dump()->setPosition(vec3(0, 50, 0));

Expand Down
6 changes: 5 additions & 1 deletion src/Managers/Entities/Light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ Light *Light::loadFromFile(const string &filePath)
Light *Light::dump()
{
defaultDump();
// TODO: typeDump light
LOG_NOFORMAT("\t ---Type settings---\n");
LOG_NOFORMAT(FORMAT("\t%1%: %2%\n", "Diffuse" % mLight->getDiffuseColour()));
LOG_NOFORMAT(FORMAT("\t%1%: %2%\n", "Specular" % mLight->getSpecularColour()));
LOG_NOFORMAT(FORMAT("\t%1%: %2%\n", "Radius" % mLight->getAttenuationRange()));
LOG_NOFORMAT(FORMAT("\t%1%: %2%\n", "Power" % mLight->getPowerScale()));

return this;
}
Expand Down

0 comments on commit 913138d

Please sign in to comment.