Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
matt77hias committed Mar 27, 2017
1 parent 0821e76 commit 52c3f6a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MAGE/MAGE/src/scene/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ namespace mage {
script.Update(elapsed_time, *this);
});
}
void Scene::Render() {
void Scene::Render() const {
TransformBuffer transform_buffer(GetCamera());
m_world->Render(transform_buffer);
}
Expand Down
4 changes: 2 additions & 2 deletions MAGE/MAGE/src/scene/scene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace mage {
/**
Renders this scene.
*/
void Render();
void Render() const;

/**
Closes this scene.
Expand All @@ -103,7 +103,7 @@ namespace mage {

string m_name;
SharedPtr< Camera > m_camera;
SharedPtr< World > m_world;
UniquePtr< World > m_world;
set< SharedPtr< BehaviorScript >, std::less<> > m_scripts;
};
}
Expand Down
2 changes: 1 addition & 1 deletion MAGE/MAGE/src/world/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//-----------------------------------------------------------------------------
namespace mage {

void World::Render(const TransformBuffer &transform_buffer) {
void World::Render(const TransformBuffer &transform_buffer) const {
ForEachModel([&](const Model &model) {
model.Draw(*this, transform_buffer);
});
Expand Down
2 changes: 1 addition & 1 deletion MAGE/MAGE/src/world/world.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace mage {
RemoveAllLights();
}

void Render(const TransformBuffer &transform_buffer);
void Render(const TransformBuffer &transform_buffer) const;

//-------------------------------------------------------------------------
// Models
Expand Down

0 comments on commit 52c3f6a

Please sign in to comment.