DarthMike / indielib-crossplatform

IndieLib is a cross-platform Game Graphics engine. Main focus is OpenGL ES 2.0 for mobile iOS operating system, and OpenGL desktop. **NOT SUPPORTED ANYMORE**
zlib License
61 stars 27 forks source link

SDL 2.0 method SDL_SetWindowDisplayMode only works for fullscreen mode #25

Closed M-F-K closed 12 years ago

M-F-K commented 12 years ago

When resetting window resolution in windowed mode, the call to SDL_SetWindowDisplayMode does not do anything. If we want to support resolution resetting on windowed mode without destroying the window this method in SDL 2.0 should offer params resetting.

Deleting window causes, for DirectX and OpenGL contexts/devices to be invalid, thus loosing all loaded objects (textures, buffer objects) on the renderer. User should then reload all assets, which complicates all engine logic.


Original non-crossplatform code used SDL 1.2, and called, without destroying the window, SDL_SetVideoMode(..), thus resetting window resolution correctly without destroying the video device/context.

DarthMike commented 12 years ago

Tested on OpenGL and DirectX and this fixes the issue.