]> git.tdb.fi Git - libs/game.git/blob - source/gameview/meshrenderer.h
96fe6125b3d209ce70c6291d3a7bb9587af535b6
[libs/game.git] / source / gameview / meshrenderer.h
1 #ifndef MSP_GAMEVIEW_MESHRENDERER_H_
2 #define MSP_GAMEVIEW_MESHRENDERER_H_
3
4 #include <msp/game/component.h>
5 #include <msp/game/meshsource.h>
6 #include <msp/gl/objectinstance.h>
7
8 namespace Msp::GameView {
9
10 class MeshRenderer: public Game::Component
11 {
12 private:
13         Game::Handle<Game::MeshSource> source;
14         const GL::Object &object;
15         GL::ObjectInstance instance;
16
17 public:
18         MeshRenderer(Game::Handle<Game::Entity>, Game::Handle<Game::MeshSource>);
19
20         GL::ObjectInstance &get_instance() { return instance; }
21
22         void update_matrix();
23 };
24
25 } // namespace Msp::GameView
26
27 #endif