I’m currently porting my programs from SDL1.3 to SDL2 and want users to be able to switch between windowed- and fullscreen-mode. I use SDL_SetWindowFullscreen to do that and it works quite nicely. However, there is one thing that bugs me. As soon as I call SDL_SetWindowFullscreen my program immediately forgets about any “alpha”-information and even calling SDL_SetTextureAlphaMod again doesn’t do anything. Which means I can’t hav esemi-transparent sprites etc.
I create my window by calling:
gWindow = SDL_CreateWindow( “ProgName”, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL_WINDOW_SHOWN);
gWindow = SDL_CreateWindow( “ProgName”, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL_WINDOW_SHOWN|SDL_WINDOW_FULLSCREEN);
both work perfectly and show “alpha-textures” as long as I don’t call SDL_SetWindowFullscreen.
I only tested it on a Windows 7 computer. Don’t know if the behaviour would be the same on another operating system.
Am I the only one with this problem?