Afternoon all,
To cut down on drawing calls I'm playing around with the idea of rendering map sprites to a render target then drawing that to the main screen.
However as this is a map editor I need to be able to invalidate specific regions so I can re-draw the changes the user made.
Here's my current code:
var clearShape = new RectangleShape
{
Size = new Vector2f(32, 32),
FillColor = new Color(0, 0, 0, 1)
};
clearShape.Position = new Vector2f(0, 0);
_mapTexture.Draw(clearShape, new RenderStates(BlendMode.None));
It works very well, but I feel like there must be an easier (and less hacky. see: alpha value of 1 in colour) way to do this.
Any ideas?
Thanks,
Robin