Re: [AD] Allegro5 and colors

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Laurence Withers wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 08 September 2002 18:54, Bob wrote:
However, if we want to support depths larger than 32 bpp, we can't
pass that value as a 32-bit int (obviously).

typedef char al_color[8];
al_color al_makecol(BITMAP*, int, int, int); // rgb, obviously :-)
al_color al_makecol_yuv(BITMAP*, int, int, int);
al_color al_makecol_cmyk(BITMAP*, int, int, int, int);


How safe is returning an array from a function? How fast is it? Does speed matter in our case?


An other alternative is to have the current color as a state, much
like OpenGL:
[snip]

Please don't do this :-)


Of course. I was just presenting some alternatives. I don't like the state based system (unless everything is state-based). However, I don't see a nice way out, which is why I'm posting here.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/