]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/object.h
Rename RenderPass to RenderMethod
[libs/gl.git] / source / render / object.h
index c97e951c16d04d7186d8c6bdeca2902041e05669..dea389e4b8ae4d0d841ccbea333341bbc2a40ef9 100644 (file)
@@ -2,19 +2,16 @@
 #define MSP_GL_OBJECT_H_
 
 #include <vector>
-#include "bindable.h"
 #include "renderable.h"
-#include "renderpass.h"
+#include "rendermethod.h"
 #include "resourceobserver.h"
 
 namespace Msp {
 namespace GL {
 
-class Material;
 class Mesh;
 class ObjectInstance;
 class Technique;
-class Texture;
 
 /**
 Combines a Mesh with a Technique to give it an appearance.  The Technique will
@@ -53,10 +50,10 @@ public:
        class Loader: public LodLoader
        {
        public:
-               Loader(Object &);
-               Loader(Object &, Collection &);
+               Loader(Object &o): Loader(o, 0) { }
+               Loader(Object &o, Collection &c): Loader(o, &c) { }
        private:
-               void init();
+               Loader(Object &, Collection *);
                virtual void finish();
 
                void bounding_sphere_hint(float, float, float, float);
@@ -66,15 +63,15 @@ public:
 private:
        struct LevelOfDetail
        {
-               RefPtr<const Mesh> mesh;
-               RefPtr<const Technique> technique;
+               const Mesh *mesh;
+               const Technique *technique;
        };
 
        std::vector<LevelOfDetail> lods;
        Geometry::BoundingSphere<float, 3> bounding_sphere;
        bool lod0_watched;
 
-       static Matrix identity_matrix;
+       static const Matrix identity_matrix;
 
 public:
        Object();
@@ -121,7 +118,7 @@ protected:
        virtual void finish_render(Renderer &, Tag) const { }
 
 private:
-       const RenderPass *get_pass(Tag, unsigned) const;
+       const RenderMethod *get_method(Tag, unsigned) const;
 
        virtual void resource_loaded(Resource &);
        virtual void resource_removed(Resource &);