[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] Perlin noise in libgag
From: |
Stéphane Magnenat |
Subject: |
Re: [glob2-devel] Perlin noise in libgag |
Date: |
Sun, 4 Feb 2007 14:05:48 +0100 |
User-agent: |
KMail/1.9.6 |
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?
Have a nice day,
Steph
--
http://nct.ysagoon.com