Discussion:
[SDL] Resize Window Without Scaling?
Outstream
2016-11-02 19:06:25 UTC
Permalink
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.

Loading...