I'm building a top down, real time space game. I'd like to have a minimap available, and I'm somewhat stuck on how to do this.
I currently have a graphics manager, who maintains a list of graphics tokens (a wrapped sprite, basically). I also have an sf::View set up to properly show everything at the right scale. Because we needed to conform to box2d's standards, we scale all our images way down, then zoom the camera in.
My draw method currently iterates over my graphcis tokens and draws them, and everything is wonderful. Now, however, I'd like to redraw everything in that list, only to a 100x100 area in the corner of the screen.
Now, let's say my View shows 80x60 world units, and I want my minimap to show 500x500 world units. Now, my brain tells me that this is what sf::View was born to do. Seems like my graphics manager should be able to maintain a 'game view' and a 'map view' and just swap them out.
Only, there seems to be no way to render to anything but the framebuffer. I'd like to render everything to an image, for example, then draw that image in the upper right hand corner. Or tell my view to only draw on a sub section of the renderwindow. Is there a way to do this?