SFML community forums

General => Feature requests => Topic started by: ben1066 on August 22, 2011, 01:50:07 pm

Title: Scaleable windows
Post by: ben1066 on August 22, 2011, 01:50:07 pm
It would be nice to be able to add another VideoMode so that we can have a window which sfml2 thinks is say 320 x 240 however is displayed at 640 x 480 . This would be useful for old styled games such as the one I entered for ludum dare 21, http://www.ludumdare.com/compo/ludum-dare-21/?action=preview&uid=5787 . It is one of the things I wish I could do.
Title: Scaleable windows
Post by: Hiura on August 22, 2011, 02:34:44 pm
Did you try something like that ?

window.Create(640x480);
view = View(rect(0, 0, 320, 240));
window.SetView(view);

links :
http://www.sfml-dev.org/documentation/2.0/classsf_1_1RenderTarget.php#ace048d53bc91b7073b1b3baef97804de
http://www.sfml-dev.org/documentation/2.0/classsf_1_1View.php#a1d63bc49e041b3b1ff992bb6430e1326
Title: Scaleable windows
Post by: ben1066 on August 22, 2011, 03:07:42 pm
Oh, I wasn't aware this was possible, I obviously didn't read the documentation well enough. Sorry.