Reputation: 3418
I'm trying to make a game using the SDL library, and I'm wondering on what resolution I should make the game on. Sadly I dont know how windows handles different resolutions so I have no clue on what resolution I should make the game on. So what resolution should I use?
I read somewhere in a similar post on stackoverflow that it changes the resolution on the fly. Can anyone confirm this? If anyone has any articles that explain this matter please share, I couldn't find any on google.
Upvotes: 3
Views: 1291
Reputation: 322
SDL Allows you to reset the video mode the same way you set it up in the first place, through a call to SDL_SetVideoMode, the resolution will reset to the new video mode.
However, if you ever decide to use SDL to hook OpenGL into, when you call the SDL_SetVideoMode function you will lose your OpenGL context, and all the textures and states along with it, so be sure to reload all of them on screen resolution change.
Also if you want some good SDL articles, check out this link Lazyfoo SDL tutorials
Upvotes: 0
Reputation: 477150
Try SDL_ListModes
to enumerate available resolutions and pick one from those. The flags
parameter should be something like SDL_HWSURFACE | SDL_FULLSCREEN
.
Upvotes: 4