Mesh.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "GlSystem.hpp"
4 #include "../OpenGL/GlMesh.hpp"
5 
7 
8 namespace iv
9 {
10 
13 class Mesh
14 {
15 public:
16  Mesh( Instance * inst );
17  Instance * instance() const;
18 
19  GlMesh const * gl_mesh() const;
20 
21 protected:
22  GlMesh * gl_mesh();
23 
24 private:
25  Instance * inst;
26  GlMesh _mesh;
27 };
28 
29 class Mesh_Resource : public SingularResource< Mesh >
30 {
31 public:
33 
34  Mesh_Resource( Instance * inst, ResourcePath const & path ) :
35  SingularResource< Mesh >( inst, path ),
36  cm( inst, this, "Mesh_Resource" )
37  {
38  this->cm.inherits( this->SingularResource< Mesh >::cm );
39  }
40 };
41 
42 }