For my game, I have a resources class that holds all the textures, fonts, etc. and I can access them like so:
resources->getTexture("player")
which would return a reference to the player texture.
The function is
sf::Texture &getTexture(const std::string &name)
This all works fine. Now I'd like to also add all my shaders to the resources class.
Naturally I created this function
sf::Shader &getShader(const std::string &name)
which would return a reference to the shader, but the compile time error is
error C2248: 'sf::NonCopyable::NonCopyable' : cannot access private member declared in class 'sf::NonCopyable'
I really want to have all my resources in one place, so if I could somehow make this work and put all the shaders in my resources class it'd be really great.
I don't know what to do