Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Ace (SWE)

Pages: [1]
1
Graphics / Questions about blending
« on: November 04, 2012, 05:19:52 pm »
So I've been working on a project, a 2D game with a minimap. And after using a simple square for a while I decided to fix it up to work as a circle instead.
My first tries was simply using sprite blending and I never managed to get that working the way it should've, all I ended up with was a darker version of the minimap that was outside of the circle.
In the end I chose to have a rendertexture for the minimap, where I draw the circle first as white on top of a transparent background and then blend the minimap sprite with that. And while it works, it also takes up well over 50% of each frame. Even implementing a simple caching system that only redraws it when needed still makes it a slow solution.

I was hoping to have the ability to clear the alpha mask after drawing the main scene and then set up the minimap using alpha blending instead to speed it up a bit, so far I've yet to find a way of doing that on SFML 2 though.
Is there a way to do this or should I just bite the bullet and keep using the render texture method, even though it's slow and didn't even work on my laptop up until very recently. (Intel graphics)

Pages: [1]