X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frender%2Fobject.h;h=80a73cba61e2caf6ac53281af7bb7ded14c303e8;hp=c97e951c16d04d7186d8c6bdeca2902041e05669;hb=ae45c0397e2cb8f0a01f2f31d01c95ff3870271e;hpb=233dff2a6c552e08da832496aecd88ef4f8948f1 diff --git a/source/render/object.h b/source/render/object.h index c97e951c..80a73cba 100644 --- a/source/render/object.h +++ b/source/render/object.h @@ -2,19 +2,16 @@ #define MSP_GL_OBJECT_H_ #include -#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 @@ -40,7 +37,7 @@ private: LevelOfDetail &lod; public: - LodLoader(Object &, unsigned, Collection *); + LodLoader(Object &, unsigned, Collection &); private: void mesh(const std::string &); @@ -53,10 +50,8 @@ public: class Loader: public LodLoader { public: - Loader(Object &); Loader(Object &, Collection &); private: - void init(); virtual void finish(); void bounding_sphere_hint(float, float, float, float); @@ -66,15 +61,15 @@ public: private: struct LevelOfDetail { - RefPtr mesh; - RefPtr technique; + const Mesh *mesh; + const Technique *technique; }; std::vector lods; Geometry::BoundingSphere bounding_sphere; bool lod0_watched; - static Matrix identity_matrix; + static const Matrix identity_matrix; public: Object(); @@ -121,7 +116,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 &);