The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Resize Window Without Scaling?
Outstream


Joined: 17 Oct 2016
Posts: 1
I am wondering how I can resize a window without scaling the graphics drawn. For example, if the window was made smaller, it would simply "crop out" what doesn't fit in the new size. Or if there is a rectangle drawn on the window, it would have the exact same dimensions on screen as it would have before the resize.

In case this helps explain what I'm looking for: the equivalent for SFML would be
Code:
sf::Window::setView(sf::View view)


I realize this may be a very simple question, but I have searched for a very long time for an answer. The only solution I have is to recreate the window on resize (which isn't smooth when dragging to resize), or to blank out the screen (so stretching isn't seen) and recreate it after the resize is done.

Thanks in advance.