Bubba-3D  0.9.0
Awesome game engine!
Chunk.h
1 /*
2  * This file is part of Bubba-3D.
3  *
4  * Bubba-3D is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser 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  * Bubba-3D 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 Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with Bubba-3D. If not, see http://www.gnu.org/licenses/.
16  */
17 #pragma once
18 
19 #include <vector>
20 #include "linmath/float2.h"
21 #include "linmath/float3.h"
22 #include <GL/glew.h>
23 #include <map>
24 #include <BoneMatrices.h>
25 #include "BoneInfluenceOnVertex.h"
26 
27 class Chunk {
28 public:
29  Chunk();
30 
31  ~Chunk() {
32  }
33 
34  // Data on host
35  std::vector<chag::float3> m_positions;
36  std::vector<chag::float3> m_normals;
37  std::vector<chag::float2> m_uvs;
38  std::vector<unsigned int> m_indices;
39  std::vector<chag::float3> m_tangents;
40  std::vector<chag::float3> m_bittangents;
41  std::vector<BoneInfluenceOnVertex> bones;
42 
43  // Data on GPU
44  GLuint m_positions_bo;
45  GLuint m_normals_bo;
46  GLuint m_uvs_bo;
47  GLuint m_ind_bo;
48  GLuint m_tangents_bo;
49  GLuint m_bittangents_bo;
50  GLuint bonesBufferObject;
51  // Vertex Array Object
52  GLuint m_vaob;
53 
54  unsigned int materialIndex;
55 };
Definition: Chunk.h:27