[SDL] data type of void pixels in SDL_Surface

matt mattmatteh at earthlink.net
Fri Oct 6 12:24:11 PDT 2006


i am drawing pixels directly to the pixels buffer in the struct  
SDL_Surface.  i can get it to work but gets messy when i change to a 
different arch.  seems that the void is a char, short, or an int.  i was 
using it as an array of char, but i am noticing endian issues.  i was 
coding for big and little endian, but at a loss when the BitsPerPixel is 
24 and/or the BytesPerPixel is 3.  is there a correct way to code with 
the void pointer and determine the rgba order for all video modes?

thanks

matt




More information about the SDL mailing list