glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Perlin noise in libgag


From: Leo Wandersleb
Subject: Re: [glob2-devel] Perlin noise in libgag
Date: Sun, 04 Feb 2007 19:53:08 +0100
User-agent: Icedove 1.5.0.9 (X11/20061220)

Stéphane Magnenat wrote:
Hi,

I've implemented the generic alpha map drawing function. There is a software version in :
DrawableSurface::drawAlphaMap(...)
which renders plain tiles and an overloaded OpenGL version in
GraphicContext::drawAlphaMap(...)
which uses Leo's code to render map smoothly

Leo, could you try to use this rendering funciton? I suggest you make a DynamicClouds class in a new set of files (DynamicClouds.h/DynamicClouds.cpp) in src/. Such class could have a single member variable that is time and a single function that is render(DrawableSurface *dest, ...) which uses PerlinNoise class to create clouds and do a double call to drawAlphaMap(...) to render it. I've seen that your second pass does some extra computation, I'm not sure exactly what it does but I think drawAlphaMap(...) has sufficient genericity in its parameters to do the job, please correct me if I'm wrong. If we do so, we can remove any cloud/perlin noise code from libgag which is cleaner. We can also hope to use the same function to render activities maps :-)

In overall, what do you think? Do you agree the general idea?

done. i will test and commit later.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]