[SDL] osx fullscreen sw vs hw

jon jon.rafkind at gmail.com
Tue Dec 21 23:33:30 PST 2010


On 12/21/2010 02:12 PM, Patrice Mandin wrote:
> Le Tue, 21 Dec 2010 13:18:00 -0700
> jon <jon.rafkind at gmail.com> a écrit:
>
>> To set the fullscreen mode in my game I call
>>
>> screen = SDL_SetVideoMode(width, height, SCREEN_DEPTH, SDL_HWSURFACE |
>> SDL_DOUBLEBUF | SDL_FULLSCREEN);
>>
>> whereas for windowed mode I call
>>
>> screen = SDL_SetVideoMode(width, height, SCREEN_DEPTH, SDL_SWSURFACE |
>> SDL_RESIZABLE);
>>
>> On windows and linux both fullscreen and windowed mode work fine, but on
>> osx 10.6 only windowed mode looks fine. In fullscreen mode I get weird
>> colors: http://www.cs.utah.edu/~rafkind/tmp/paintown/ss.png
> Most likely you got a different organization for R,G,B,A storage in the
> SDL_Surface.
>
> Compare the values of the pixel format for the screen
> SDL_Surface->format between fullscreen and windowed mode, and check
> your drawings are properly done:
> http://wiki.libsdl.org/moin.cgi/SDL_PixelFormat
>

Seems that in fullscreen mode on osx I get RGB 5-5-5 whereas on every
other system (and windowed osx) I get 5-6-5. I had some routines that
secretly depended on getting 5-6-5 and they broke on the new format. Sigh..




More information about the SDL mailing list