Jump to content
  • Advertisement
Sign in to follow this  
ManaStone

scaling with SDL

This topic is 5178 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Check out the SDL_gfx library. It has the ability to rotate and zoom images, though I don't know how well it performs. Or if you are more ambitious, you can easily bind OpenGL code to your SDL program. That's what I decided to do when I was posed with the same problem you have.

Share this post


Link to post
Share on other sites
Quote:
Original post by ManaStone
Thx, while we are on the subject is there any way we can make the window non-movable or find out what the current resolution is?


Hmm, I'm not sure abou making the window non-movable. I know there's a way to do it but I think it might be platform dependant code (in other words, not in SDL).


Do you mean you want to know the user's resolution when the game starts? I'm not sure how to do that one either, but you can find out the supported resolutions that your user can run by making a call to SDL_ListModes(). They way I have things setup in my app right now is that when the game is first installed, it chooses a default supported resolution for the user. Then in the options menu we give the user the ability to change to a different res as long as its supported. The game stores this resolution in a configuration file and after the game is exited and the user executes it again, it will automatically use the most recently selected resolution.

In this way you can always "know" what resolution your user is doing, as long as you set it up for them initially and keep track whenever the user changes it. I hope that helps out.

Share this post


Link to post
Share on other sites
Ok, the reason I'm asking is because I want to be able to make a window that is maximized when opened. The only way I know to do that is to get the current resolution.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!