]> git.tdb.fi Git - libs/game.git/blob - source/gameview/meshrenderer.h
Decorate things which constitute the public API of the library
[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 #include "mspgameview_api.h"
8
9 namespace Msp::GameView {
10
11 class MSPGAMEVIEW_API MeshRenderer: public Game::Component
12 {
13 private:
14         Game::Handle<Game::MeshSource> source;
15         const GL::Object &object;
16         GL::ObjectInstance instance;
17
18 public:
19         MeshRenderer(Game::Handle<Game::Entity>, Game::Handle<Game::MeshSource>);
20
21         GL::ObjectInstance &get_instance() { return instance; }
22
23         void update_matrix();
24 };
25
26 } // namespace Msp::GameView
27
28 #endif