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
[SDL2]-Scale Entire Window By Two? 320x240->640x480
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
[SDL2]-Scale Entire Window By Two? 320x240->640x480

Hi,

I have a curious question about SDL2.
Would it be possible to scale the entire SDL2 window by a factor of two at application launch?

For my case I would like to have a 320x240 window that is scaled upwards to 640x480.
Is the above possible with SDL2?
Window resizing and full screen should still work with the solution.

I am a programmer with little artistic ability so having less pixels to work with would be beneficial.
Thanks!
[SDL2]-Scale Entire Window By Two? 320x240->640x480
David Olofson
Guest

I think you want SDL_RenderSetScale().

That said, having done a bit of pixel art through the years, I'm not
sure fewer pixels actually make things easier. Fewer pixels indeed -
but it gets more critical how they're used. Wink

On Mon, Feb 23, 2015 at 4:32 AM, JeZ-l-Lee
wrote:
Quote:
[SDL2]-Scale Entire Window By Two? 320x240->640x480

Hi,

I have a curious question about SDL2.
Would it be possible to scale the entire SDL2 window by a factor of two at
application launch?

For my case I would like to have a 320x240 window that is scaled upwards to
640x480.
Is the above possible with SDL2?
Window resizing and full screen should still work with the solution.

I am a programmer with little artistic ability so having less pixels to work
with would be beneficial.
Thanks!


________________________________

JeZ+Lee
JessePalser <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




--
//David Olofson - Consultant, Developer, Artist, Open Source Advocate

.--- Games, examples, libraries, scripting, sound, music, graphics ---.
| http://consulting.olofson.net http://olofsonarcade.com |
'---------------------------------------------------------------------'
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: [SDL2]-Scale Entire Window By Two? 320x240->640x480
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
David Olofson wrote:
I think you want SDL_RenderSetScale().

That said, having done a bit of pixel art through the years, I'm not
sure fewer pixels actually make things easier. Fewer pixels indeed -
but it gets more critical how they're used. Wink
Hi,

Yes, the "SDL_RenderSetScale()" should work well for my needs.
Thank you for the info!
Not sure what my next SDL2 project will be, but am kind of tired of puzzle games Smile