Hello,
I have a strange error when I try to return a RenderWindow reference from a singleton class:
Error C2280 'sf::RenderWindow::RenderWindow(const sf::RenderWindow &)': attempting to reference a deleted function.
Minimal code :
#include <SFML\Graphics.hpp>
class RenderManager
{
public:
RenderManager();
static RenderManager & rm();
sf::RenderWindow & getWindow();
private:
sf::RenderWindow window;
};
RenderManager::RenderManager()
{
window.create(sf::VideoMode(800, 600), "Realms of Dream");
tileSet.loadFromFile("gfx/tileset.png");
}
RenderManager & RenderManager::rm()
{
static RenderManager rm;
return rm;
}
sf::RenderWindow & RenderManager::getWindow()
{
return window;
}
Thanks.