Hello evryone
,
I want to make a ShaderManager. I want to use a std::map<std::string,sf::Shader> //string = ID want to make a ShaderManager. I want to use a std::map<std::string,sf::Shader> //string = ID
when I try to add a Shader to the map, i get this error:
Error 2 error C2248: 'sf::NonCopyable::NonCopyable' : cannot access private member declared in class 'sf::NonCopyable' c:\users\eric\documents\visual studio 2013\projects\sfml-3d-framework\dependency\sfml\include\sfml\graphics\shader.hpp 555 1 SFML-3D-Framework
Here's the Header:
class ShaderManager
{
private:
std::map<std::string,sf::Shader> map;
std::map<std::string,sf::Shader>::const_iterator it;
public:
~ShaderManager();
void add(sf::Shader shader, std::string name); //add Shader with name to the list
sf::Shader getShader(crString name); //Finde Shader by name
};
And here's the Cpp:
ShaderManager::~ShaderManager()
{
map.clear();
ADD_DESTRUCTOR("ShaderManager");
}
void ShaderManager::add(sf::Shader shader, std::string name)
{
map.insert(std::pair<std::string,sf::Shader>(name,shader));
}
sf::Shader ShaderManager::getShader(crString name)
{
//complete this
}
Can Somebody help me?
p.s: I'm from Germany, so please excuse my grammar