[GEM-dev] pull_request - pix_noise
Nicolas Montgermont
nicolas_montgermont at yahoo.fr
Thu Dec 15 13:35:39 CET 2011
Le 14/12/11 15:54, IOhannes m zmoelnig a écrit :
> btw, i pushed a cleaned up version.
The [Grey( message is now generating a blue image.
But it's working after a [set x y(
so it must be a difference between the declaration in the constructor
and in the set message.
declaring the constructor this way is working here:
pix_noise :: pix_noise(t_floatarg xsize, t_floatarg ysize) :
m_banged(false), m_automatic(false),
m_mode(GL_RGBA),
m_rand_p(0), m_rand_k(24)
{
int dataSize;
if (xsize < 1) xsize = 256;
if (ysize < 1) ysize = 256;
int randInit = 307*1319;
initRandom(randInit);
m_pixBlock.image.xsize = (int)xsize;
m_pixBlock.image.ysize = (int)ysize;
m_pixBlock.image.csize = 4;
m_pixBlock.image.format = GL_RGBA;
m_pixBlock.image.type = GL_UNSIGNED_BYTE;
dataSize = m_pixBlock.image.xsize * m_pixBlock.image.ysize
* 4 * sizeof(unsigned char);
m_pixBlock.image.allocate(dataSize);
memset(m_pixBlock.image.data, 0, dataSize);
generateNoise();
}
n
--
http://nim.on.free.fr
More information about the GEM-dev
mailing list