Karlos wrote:
bloodline wrote:
I had to make something similar when I was trying to make GUI in SDL.
I had to look for all the areas where the "windows" over lapped and then make sure those areas were not updated.
I had to do it Vertically and then Horizontally (For every window, starting at the one below the top most one) too, I thought it would be slow, but it's not... on any of my PC's... I wouldn't want to run it on my 68K's or even my PPC :-/
You did this for rectangular windows? How come you never used a straightforward layered rectangle clipping approach for that? It would be orders of magnitude more efficient than scanning pixels.
No, I didn't scan pixels :-), but I had two loops. one that divided the windows horisontally, and one that did it virtically, which at the end cuts the windows up into visible and invisible rectangles.
I was just saying that the separating out the H and the V is not a bad thing in my mind.
My problem is that I'm dealing with irregular blobs so I have to do this.
What about colour? do you always know what colour the background is going to be?
I'm wondering if you can't use some collision detection thingie... :-/