[Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11433 >
On Thu, 9 Dec 2004, [UTF-8] Andreas Røsdal wrote:
>
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=11433 >
>
> Following the discussion on how to do fog of war with alpha blending, I
> did a little test to implement an improvement to the fog of war rendering.
>
> It doesn't use alpha-blending, since you would need to use pixbufs.
> Instead the brightness of every pixel is reduced by 50%, by iterating over
> each pixel in the pixmap.
>
> There is little or no performance hit that I can notice, but it would be a
> good idea to do some benchmarking. Is is possible to get a frames/s
> output?
>
> Patch against CVS head, for the Gtk 2.x client.
>
> Screenshot: http://www.stud.ntnu.no/~andrearo/scr.png
This code has several flaws.
* It won't work on anything but TrueColor displays (but I'm ok with this).
* It will be slow, because it does a roundtrip. First it gets the image
from X server space into client side space, then it sends it back into X
server space.
* It will be slow, because you use *_get_pixel/*_put_pixel instead of a
more optimal way of traversing the pixels.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Andreas Røsdal, 2004/12/09
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, email_address=jdorje@xxxxxxxxxxx, 2004/12/09
- [Freeciv-Dev] (PR#11433) Fog of War rendering improvement, Jason Short, 2004/12/09
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Andreas Røsdal, 2004/12/10
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement,
Vasco Alexandre da Silva Costa <=
- [Freeciv-Dev] (PR#11433) Fog of War rendering improvement, Jason Short, 2004/12/10
- [Freeciv-Dev] (PR#11433) Fog of War rendering improvement, Jason Short, 2004/12/10
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Andreas Røsdal, 2004/12/11
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Jason Short, 2004/12/11
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Jason Short, 2004/12/11
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Andreas Røsdal, 2004/12/11
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Jason Short, 2004/12/11
- [Freeciv-Dev] Re: (PR#11433) Fog of War rendering improvement, Andreas Røsdal, 2004/12/12
|
|