OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
matrixbuffer.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef MATRIXBUFFER_H
19 #define MATRIXBUFFER_H
20 
21 #include "index.h"
22 #include "material.h"
23 #include "texturebufferobject.h"
24 #include "shadermanager.h"
25 #include "meshmanager.h"
26 #include "entitymanager.h"
27 #include "positionmanager.h"
28 
29 namespace Engine
30 {
31  class MatrixBuffer : public Material
32  {
33  public:
34 
35  MatrixBuffer( Entity * entity );
36  ~MatrixBuffer(){}
37 
38  void create( int tbo_draws , Vector3fv tbo_data , bool update_flag );
39  void setTBOData( Vector3fv tbo_data );
40 
41  void enable( int texture_unit );
42 
43 
44 
45  private:
46 
47  TextureBufferObject * mTBO;
48  IShader * mShader;
49  Mesh * mMesh;
50  Position * mPosition;
51 
52  int m_tbo_draws;
53  Vector3fv m_tbo_data;
54  bool m_update_tbo;
55  };
56 }
57 
58 
59 #endif // MATRIXBUFFER_H
The Entity - base component class - for 3D Entitys.
Definition: entity.h:28
Definition: element.h:23
The IShader - abstract / interface class.
Definition: IShader.h:30
Definition: material.h:59
The TextureBufferObject class.
Definition: texturebufferobject.h:35
The Mesh class.
Definition: mesh.h:32
Definition: matrixbuffer.h:31
The Position class.
Definition: position.h:29