#define MSP_GL_OBJECT_H_
#include <vector>
-#include "bindable.h"
#include "renderable.h"
#include "renderpass.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
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);
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();