I'm trying to implement a more "general" renderer that can draw to either a renderWindow OR a renderTexture.
So I inherit from something like:
class IRenderer
{
public:
virtual void Render(sf::RenderTarget &rt) = 0;
};
I'm lead to believe I must call "display()" after drawing...
This function updates the target texture with what has been drawn so far. Like for windows, calling this function is mandatory at the end of rendering. Not calling it may leave the texture in an undefined state.
This leads to a problem, because my inherited renderer cannot call "display()" because it is not a virtual method in RenderTarget (it is contained in both RenderTexture & RenderWindow separately).
Is my entire architecture kind of wonky? I sorta thought having a generic renderer that can just "RenderThisListOfThings" on "ThisRenderTarget" would be pretty versatile.