[GEM-dev] pull_request - pix_noise
Nicolas Montgermont
nicolas_montgermont at yahoo.fr
Thu Dec 22 18:35:46 CET 2011
after some tests, there is still a colorspace problem when using the set
message.
I think there is no reason the image initialization in the set message
should be different than in the constructor.
Using this declaration of the setMess function solve this problem here:
---
void pix_noise :: SETMess(int xsize, int ysize)
{
if ((xsize < 1) || (ysize < 1)) return;
m_pixBlock.image.clear();
m_pixBlock.image.xsize = (int)xsize;
m_pixBlock.image.ysize = (int)ysize;
m_pixBlock.image.setCsizeByFormat(GL_RGBA);
m_pixBlock.image.allocate();
generateNoise();
}
Best,
n
Le 15/12/11 17:35, Nicolas Montgermont a écrit :
> ok that's clear.
> it works now.
> this is the syntax used in [pix_set] maybe you should have a look
> there as well.
> thanks
> n
>
> Le 15/12/11 17:07, IOhannes m zmoelnig a écrit :
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> i had a look and found the following:
>> - - the code was always buggy :-)
>> - - it used fixed color offsets within pixels (e.g. "3" for "blue"),
>> which
>> is simply wrong on OSX. Gem has special constants "chRed",... for
>> platform independent color offsets.
>> - - i also changed the color-type from GL_RGBA to GL_RGBA_GEM, which
>> will
>> actually do the same (GL_RGBA on w32&linux and GEM_BGRA_EXT on osx) but
>> with less confusion :-)
>>
>
--
http://nim.on.free.fr
More information about the GEM-dev
mailing list