OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
particlemanager.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 PARTICLEMANAGER_H
19 #define PARTICLEMANAGER_H
20 
21 #include "index.h"
22 #include "meshmanager.h"
23 #include "texturebufferobject.h"
24 #include "particleeffect.h"
25 
26 namespace Engine
27 {
28 
29  using ParticleEffects = std::list< ParticleEffect * >;
30 
31  //DEPRECATED
33  {
34  private:
35 
36  static ParticleManager * ptrInstance;
37 
39 
41 
42  void operator=( const ParticleManager& ){}
43 
44  void initialize(void);
45 
46  public:
47 
48  static ParticleManager * getSingletonPtr(void);
49 
50  void addEffect( ParticleEffect * effect , int particle_count );
51 
52  void remove( ParticleEffect * effect );
53  void remove( const std::string & effect_name );
54  void removeAll(void);
55 
56  void trigger( ParticleEffect * effect );
57  void trigger( const std::string & effect_name );
58 
59  ParticleEffects getParticleEffects(void);
60 
61  ParticleEffect * getEffect( const std::string & effect_name );
62 
63  private:
64 
65  GLVertexArrayObject * m_particle_vao;
66  GLVertexBuffer * m_vertex_buffer;
67  GLElementBuffer * m_index_buffer;
68 
69  IShader * m_particle_shader;
70  TextureBufferObject * m_particle_tbo;
71 
72  ParticleEffects m_effects;
73 
74  };
75 
76 }
77 #endif // PARTICLEMANAGER_H
Definition: element.h:23
The GLVertexBuffer class.
Definition: glvertexbuffer.h:30
The IShader - abstract / interface class.
Definition: IShader.h:30
The GLElementBuffer class.
Definition: glelementbuffer.h:29
The TextureBufferObject class.
Definition: texturebufferobject.h:35
The ParticleEffect - abstract class.
Definition: particleeffect.h:57
The GLVertexArrayObject class.
Definition: glvertexarrayobject.h:60
Definition: particlemanager.h:32