I’m using the SDL 2D renderer. I’ve discovered that when I toggle
between fullscreen and windowed mode, I lose all my textures that were
created with render-to-texture. But the regular textures seem to
survive, and render-to-textures that are recreated will correctly
display.
I’m wondering if this is related to the recent thread:
[D3D9]Cannot recreate streaming texture
I’m just using defaults with the SDL 2D renderer. I didn’t request
anything. I don’t even know what is being used behind the scenes to
render in this case. This is regular Windows, not WinRT.
This only happens on Windows. Mac and Linux don’t have any problems
with this. (Though, minor digression: On Mac, there is a few second
delay on launch where the image is not resized to fit the whole
screen…I would love to know the cause of that.) Here are some
prebuilt binaries that can demonstrate the issue.
Hit Alt-Enter or Ctrl-F to toggle fullscreen. (Use Cmd instead of Alt on Mac.)
Windows (Windows 7+ 64-bit)
zip: http://playcontrol.net/tempdownload/BlurrrBinaries/FlappyBlurrrCWindows.zip
installer: http://playcontrol.net/tempdownload/BlurrrBinaries/FlappyBlurrrC-1.0.0-win64.exe
Mac
http://playcontrol.net/tempdownload/BlurrrBinaries/FlappyBlurrrCMac.zip
Linux (64-bit, SteamOS runtime compliant)
http://playcontrol.net/tempdownload/BlurrrBinaries/FlappyBlurrrC-0.1.1-Linux.tar.gz
Source code is here. It is a little lengthy and not fully cleaned up,
but you should be able to verify if I’m not doing anything wrong.
https://bitbucket.org/ewing/flappyblurrrc
(If you are curious, I will write a formal tutorial for this in the
coming months. This is part of a new initiative to launch a new
commercial SDK that uses and embraces (instead of hides) SDL as the
foundation.)
Thanks,
Eric–
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/