OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
meshmanager.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 MESHMANAGER_H
19 #define MESHMANAGER_H
20 
21 #include "index.h"
22 #include "mesh.h"
23 #include "wavefrontloader.h"
24 
25 namespace Engine
26 {
37  class MeshManager : public Arch::ITempDatabase< Mesh >
38  {
39 
40  public:
41  MeshManager();
42  ~MeshManager() = default;
43 
51 
58  Mesh * createMesh( const std::string & resource_file );
59  Mesh * createMesh( const std::string & resource_name , Vector3fv vertices );
60  Mesh * createEmbeddedMesh( const std::string & source );
67  Mesh * getMesh( uint container_id );
68 
74  void destroy( uint container_id );
75 
81  void printInfoMessage( const std::string & resource_name );
82  };
83 
84 }
85 #endif // MESHMANAGER_H
The MeshData - abstract class.
Definition: meshdata.h:32
void printInfoMessage(const std::string &resource_name)
printInfoMessage
Definition: MeshManager.cpp:26
Definition: element.h:23
The MeshManager class.
Definition: meshmanager.h:37
Mesh * getMesh(uint container_id)
getMesh
Definition: MeshManager.cpp:181
GLVertexArrayObject * createVertexArrayObject(const MeshData &mesh_data)
createVertexArrayObject
Definition: MeshManager.cpp:33
Mesh * createMesh(const std::string &resource_file)
createMesh
The Mesh class.
Definition: mesh.h:32
The GLVertexArrayObject class.
Definition: glvertexarrayobject.h:60
void destroy(uint container_id)
destroy
Definition: MeshManager.cpp:188