Neo  0.5.0
Developer Documentation
FXManager.h
Go to the documentation of this file.
1 //========================================================================
2 // Copyright (c) 2003-2011 Anael Seghezzi <www.maratis3d.com>
3 //
4 // This software is provided 'as-is', without any express or implied
5 // warranty. In no event will the authors be held liable for any damages
6 // arising from the use of this software.
7 //
8 // Permission is granted to anyone to use this software for any purpose,
9 // including commercial applications, and to alter it and redistribute it
10 // freely, subject to the following restrictions:
11 //
12 // 1. The origin of this software must not be misrepresented; you must not
13 // claim that you wrote the original software. If you use this software
14 // in a product, an acknowledgment in the product documentation would
15 // be appreciated but is not required.
16 //
17 // 2. Altered source versions must be plainly marked as such, and must not
18 // be misrepresented as being the original software.
19 //
20 // 3. This notice may not be removed or altered from any source
21 // distribution.
22 //
23 //========================================================================
24 
25 
26 #ifndef __FX_MANAGER_H
27 #define __FX_MANAGER_H
28 
29 namespace Neo
30 {
31 // FX ref
32 class NEO_ENGINE_EXPORT FXRef
33 {
34 public:
35 
36  FXRef(unsigned int FXId, ShaderRef * vertexShaderRef, ShaderRef * pixelShaderRef):
37  m_FXId(FXId),
38  m_vertexShaderRef(vertexShaderRef),
39  m_pixelShaderRef(pixelShaderRef)
40  {}
41 
42  ~FXRef(void);
43 
44 private:
45 
46  unsigned int m_FXId;
47  ShaderRef * m_vertexShaderRef;
48  ShaderRef * m_pixelShaderRef;
49 
50  bool m_important;
51 
52 public:
53 
54  inline unsigned int getFXId(void){ return m_FXId; }
55  inline ShaderRef * getVertexShaderRef(void){ return m_vertexShaderRef; }
56  inline ShaderRef * getPixelShaderRef(void){ return m_pixelShaderRef; }
57 
58  inline bool isImportant() { return m_important; }
59  void setImportant(bool val) { m_important = val; }
60 };
61 
62 
63 // FX manager
64 class NEO_ENGINE_EXPORT FXManager
65 {
66 private:
67 
68  // refs
69  vector <FXRef *> m_FXRefs;
70 
71 public:
72 
73  // destructor
74  virtual ~FXManager(void);
75 
76 public:
77 
78  // clear
79  virtual void clear(void);
80 
81  // fx refs
82  FXRef * addFXRef(unsigned int FXId, ShaderRef * vertexShaderRef, ShaderRef * pixelShaderRef);
83  inline FXRef * getFXRef(unsigned int id){ return m_FXRefs[id]; }
84  inline unsigned int getFXRefsNumber(void){ return m_FXRefs.size(); }
85 };
86 }
87 #endif
void setImportant(bool val)
Definition: FXManager.h:59
unsigned int getFXRefsNumber(void)
Definition: FXManager.h:84
Definition: FXManager.h:64
ShaderRef * getVertexShaderRef(void)
Definition: FXManager.h:55
Definition: FXManager.h:32
FXRef(unsigned int FXId, ShaderRef *vertexShaderRef, ShaderRef *pixelShaderRef)
Definition: FXManager.h:36
Definition: ShaderRef.h:41
bool isImportant()
Definition: FXManager.h:58
FXRef * getFXRef(unsigned int id)
Definition: FXManager.h:83
ShaderRef * getPixelShaderRef(void)
Definition: FXManager.h:56
Definition: Color.h:29
unsigned int getFXId(void)
Definition: FXManager.h:54