Jump to content
  • Advertisement
Sign in to follow this  
bbirdsey

OpenGL Enumerating screen res. in OpenGL without using D3D or Win32?

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

I am collaborating on an cross platform, open source development game (www.aaronbishopgames.com). It is currently running on Win32 using SDL/OpenGL and we are wanting to extend it to Linux and Mac platforms. After hours of searching I have found that there are methods for enumerating the valid fullscreen display modes using the command Windows GDI command EnumDisplaySettings. I was wondering if there was an OpenGL extension or a platform independent library that allows for some similar functionality. Can someone point me in the right direction?

Share this post


Link to post
Share on other sites
Advertisement
You should just be able to use compile time statements to check what operating system the program is being compiled for. Then use the appropriate calls to the operating systems librarys or functions that will be able to get this information. I'm not sure about macs but I think there might be something in the X windows headers and librarys about this. (I'm not sure though, haven't done any programming on linux for a long time)

Share this post


Link to post
Share on other sites
Thanks win_crook,

That is a decent proposal and that is how the os-dependent file management calls were done in the "original version" of the software (Egoboo).

We could definitely write a separate run-time module for each supported os.

What I am still hoping for is some OpenGL / GLU / GLExt / GLUT solution. This SHOULD work, since the GL library used on a given computer should be provided by the video card manufacturer for best performance. Therefore, there should be some kind of hook to figure out the supported mode(s). ARGHHH!

Share this post


Link to post
Share on other sites
I'm quite sure you might have a problem with getting information like that from OpenGL since it offers hardly any access to the hardware. I'm no expert on OpenGL though, so you'd have to look around.

Share this post


Link to post
Share on other sites
hizoly crazap, rip-off!

ARGH, the SDL naming convention!!!

Ok, I will go die a silent death of embarrassment, now....

Share this post


Link to post
Share on other sites
Quote:
Original post by bbirdsey
hizoly crazap, rip-off!

ARGH, the SDL naming convention!!!

Ok, I will go die a silent death of embarrassment, now....


If you read the SDL doc wiki, you get a good feel for the kind of functions SDL provides. Then when you are trying to remember what it is called consult this handy reference [smile].

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!