From 1e974e526806cf1dd5f65b146dfbbb5bf4d7c19b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 23 Aug 2012 09:30:20 +0300 Subject: [PATCH] Move some declarations around a bit --- source/buffer.cpp | 4 ++-- source/light.cpp | 6 +++--- source/object.h | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/source/buffer.cpp b/source/buffer.cpp index fbb1e159..e033871f 100644 --- a/source/buffer.cpp +++ b/source/buffer.cpp @@ -8,6 +8,8 @@ using namespace std; namespace Msp { namespace GL { +const Buffer *Buffer::bound[4] = { 0, 0, 0, 0 }; + Buffer::Buffer(BufferType t): type(t), usage(STATIC_DRAW) @@ -88,7 +90,5 @@ void Buffer::restore(const Buffer *buf, BufferType type) } } -const Buffer *Buffer::bound[4] = { 0, 0, 0, 0 }; - } // namespace GL } // namespace Msp diff --git a/source/light.cpp b/source/light.cpp index 067cc3d1..4b2e289c 100644 --- a/source/light.cpp +++ b/source/light.cpp @@ -7,6 +7,9 @@ using namespace std; namespace Msp { namespace GL { +unsigned Light::current_unit = 0; +vector Light::current_lights(1); + Light::Light(): ambient(0), diffuse(1), @@ -117,8 +120,5 @@ void Light::unbind_from(unsigned i) unbind(); } -unsigned Light::current_unit = 0; -vector Light::current_lights(1); - } // namespace GL } // namespace Msp diff --git a/source/object.h b/source/object.h index bd66e7ee..69759c80 100644 --- a/source/object.h +++ b/source/object.h @@ -23,10 +23,6 @@ similar objects. See class ObjectInstance. */ class Object: public Renderable { -private: - std::vector > meshes; - RefPtr technique; - public: class Loader: public DataFile::CollectionObjectLoader { @@ -45,6 +41,11 @@ public: void technique(const std::string &); }; +private: + std::vector > meshes; + RefPtr technique; + +public: Object(); Object(const Mesh *, const Technique *); ~Object(); -- 2.43.0