Sign in to follow this  

Get Supported Resolutions

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

how do i get all supported resolutions of the client machine? i need it for my settings application. it should work on mac and windows and i don't want to try all resolutions to get the supported ones (some displays have strange resolutions like 1440x900 and such stuff). i know that a gl call will not work but is there a glut routine? thanks

Share this post


Link to post
Share on other sites
Have a look at:

EnumDisplaySettings

The EnumDisplaySettings function obtains information about one of a display device's graphics modes. You can obtain information for all of a display device's graphics modes by making a series of calls to this function.

BOOL EnumDisplaySettings(
LPCTSTR lpszDeviceName, // specifies the display device
DWORD iModeNum, // specifies the graphics mode
LPDEVMODE lpDevMode // points to structure to receive settings
);

Hope this helps you a bit.

greetz,

Ward

Share this post


Link to post
Share on other sites
No. There's no cross platform way to pull this off without maybe using an external library (I can't think of anything relevant in SDL though).

Share this post


Link to post
Share on other sites
so the only way to get it on all plattforms is (the dirty one) to test every resolution and look if the resolution change was successfully.
ok thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by Eitsch
so the only way to get it on all plattforms is (the dirty one) to test every resolution and look if the resolution change was successfully.

Not really. The proper way to do it is by using platform dependent code to query the available resolutions.

Share this post


Link to post
Share on other sites
Quote:
Original post by Eitsch
so the only way to get it on all plattforms is (the dirty one) to test every resolution and look if the resolution change was successfully.
ok thanks


Since the method of changing resolutions is platform-dependent, it makes sense that the method of enumerating those resolutions would also be platform-dependent.

Share this post


Link to post
Share on other sites

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