SDL2-Questions About Full Screen Modes? |
MrTAToad
|
The easiest way would be with SDL_SetWindowFullscreen. However, as I posted elsewhere, if a texture is set for streaming then the change to full screen seems to wipe the data for some reason. Any other texture type has its graphics preserved.
|
|||||||||||
|
JeZ-l-Lee
|
Hi,
I did some research on the SDL2 Wiki. I have this code now which does not entirely work properly:
The main problem is when ever the window/full screen mode is changed a new SDL2 window is created? How can I tell SDL2 to use the same SDL2 window as before? Thanks! |
|||||||||||||
|
SDL2-Questions About Full Screen Modes? |
Bob Rubbens
Guest
|
Did you see MrTAToad's answer? Or does it not work/is not possible?
With SDL_SetWindowFullscreen (https://wiki.libsdl.org/SDL_SetWindowFullscreen) you can set it to full screen, and then when the screen is fullscreen you can use SDL_SetDisplayMode (https://wiki.libsdl.org/SDL_SetWindowDisplayMode) to set the right resolution. Just for completeness, if you want to set the resolution when the screen is windowed you can use SDL_SetWindowSize (https://wiki.libsdl.org/SDL_SetWindowSize). Regards Bob Rubbens 2014-12-11 17:17 GMT+01:00 JeZ-l-Lee:
|
|||||||||||||
|
JeZ-l-Lee
|
Thanks, we got it working now...
|
|||||||||||
|