Game Develop C++ Platform: ShaderManager.h Source File

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
ShaderManager.h
Go to the documentation of this file.
1
6 #ifndef SHADERMANAGER_H
7 #define SHADERMANAGER_H
8 #include <map>
9 #include <string>
10 #include <boost/shared_ptr.hpp>
11 #include <boost/weak_ptr.hpp>
12 #include <SFML/Graphics.hpp>
13 namespace gd { class Project; }
14
20 class ShaderManager
21 {
22 public:
23 ShaderManager();
24 virtual ~ShaderManager() {};
25 void SetGame(gd::Project * game_) { game = game_; }
26
27 boost::shared_ptr<sf::Shader> GetSFMLShader(const std::vector<std::string> & shaders);
28
29 private:
30 mutable std::map < std::vector<std::string>, boost::weak_ptr<sf::Shader> > alreadyLoadedShader;
31
32 gd::Project * game;
33 };
34
35 #endif // SHADERMANAGER_H
36