PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

ColorrefToNative()

Hi,

I'm puzzle as to why ColorredToNative() returns a DWORD. The compiler gives me a warning, and I typecast the result to a DWORD to shut it up, but shouldn't the function simply return a word?

Is there a case where we may need a DWORD to store a native color?

Thanks,

--Eric
Basically it returns a DWORD for performance reasons.. There might be slightly more overhead to use WORD registers on some devices..

If CGapiRGBASurface had ColorrefToNative it has to return 32-bit values since each pixel is stored as a 32-bit RGBA value...
Thanks for the answers!

--Eric