From: Duilio J. P. <dp...@fc...> - 2004-07-02 14:54:42
|
El jue, 01 de 07 de 2004 a las 14:26, Dennis Smit escribi=C3=B3: > I was thinking some more about this.. >=20 > I think it's wise to change the void *screenbuffer in VisVideo > to some union that is goom it's Pixel thingy: >=20 > typedef union _PIXEL { > struct { > unsigned char b; > unsigned char g; > unsigned char r; > unsigned char a; > } channels; > unsigned int val; > unsigned char cop[4]; > } Pixel; >=20 >=20 > Not entirely the same, also adding support for all the depths very well. >=20 > I think it would be good to do this at the same time as the VisColor > change, don't you agree ? IMHO, the void* is better. Typing as suggested above is good on the user side, but a library like libvisual must be as reusable as possible, and for the pixels I think the only way is to give the void*. Is ugly, but this way can be used on any context. May be I'm wrong :-) Duilio. |