Sign in to follow this  

scaling with SDL

This topic is 4843 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

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

This topic is 4843 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this