Shift and loss bytes in pixel format - internal use only?

In the online doc for SDL_PixelFormat() at
http://wiki.libsdl.org/SDL_PixelFormat, the loss and shift bytes are
noted as (internal use), although the example code on the same page
shows then being used.

It seems to me that these values are (for a particular bitmap) fixed and
tied to the mask anyway (i.e. a particular value for the mask implies a
particular value for the shift and loss). However, it is definitely
possible that I think this because I don’t understand pixel formats very
well

Is there any reason that we should avoid accessing these bytes in our
application code?

Regards

Tony Park

You can read them, you just can’t write them.On Fri, Feb 28, 2014 at 3:25 PM, Tony Park wrote:

In the online doc for SDL_PixelFormat() at http://wiki.libsdl.org/SDL_
PixelFormat, the loss and shift bytes are noted as (internal use),
although the example code on the same page shows then being used.

It seems to me that these values are (for a particular bitmap) fixed and
tied to the mask anyway (i.e. a particular value for the mask implies a
particular value for the shift and loss). However, it is definitely
possible that I think this because I don’t understand pixel formats very
well

Is there any reason that we should avoid accessing these bytes in our
application code?

Regards

Tony Park


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org