Jump to content
  • Advertisement
Sign in to follow this  
Chris_F

Can't find a decent library

This topic is 2605 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 can't seem to find (imo) a decent library for handling window and context creation. I've looked at and tested FreeGLUT, GLFW, SFML, and SDL. Each of them has let me down.

All I want is a consistent and stable (and preferably active) library that works on all major platforms (Windows, Linux, OS X) that can:

  • Create a Window, fullscreen and windowed
  • Create a OpenGL context with a specified minimum OGL version and profile
  • List available display modes and desktop resolution
  • Preferably (but I'd take what I can get) be object oriented and/or support multiple windows
    That's pretty much it. Not asking a lot, I think.

    FreeGLUT:

    Not as active as I would like, but wouldn't be a problem if it was stable and worked well. On my OS (Linux) I was unable to get the fullscreen window feature to work properly. I submitted a bug report, but don't expect much to come of it. Another issue is that it lacks any way of listing supported video modes.

    GLFW:

    Fullscreen works and it supports a video mode list, but if I try and specify a OpenGL version number higher than what's supported, it creates a window but it is buggy.

    SFML:

    Version 2 doesn't support OpenGL version hinting, and version 3 is not stable and only supports version hinting, not profile hinting. It always returns a compatibility context. When I specified a version that wasn't supported, it crashed and returned a GLX error.

    SDL:

    SDL 1.2 is the same as SFML 2, and 1.3 is also not stable.


    So that's it. I've pretty much exhausted all the obvious libraries.

Share this post


Link to post
Share on other sites
Advertisement
You have pretty much exhausted the available options, as has everyone before you - in the end you make do with what you have.

I use the glfw-lite branch (available from their source repository) of GLFW for almost everything. It isn't perfect, but it gets the job done, and when you come down to it, time wasted on this issue is time better spent developing your game :)

Share this post


Link to post
Share on other sites
I would suggest that you pick one and live with the restrictions on it until you've actually got enough game running that it's worth writing your own.

Personally I just wrote a stack of X11 code and put it in a library (because I develop under Linux). When I've got the game into a suitable state, I'll just write the Windows version of that stack. Until then, I don't need to worry about it.

If you spend too long looking for perfection it's a distraction from the actual job at hand.

Share this post


Link to post
Share on other sites

All I want is a consistent and stable (and preferably active) library that works on all major platforms (Windows, Linux, OS X) that can:
  • Create a Window, fullscreen and windowed
  • Create a OpenGL context with a specified minimum OGL version and profile
  • List available display modes and desktop resolution
  • Preferably (but I'd take what I can get) be object oriented and/or support multiple windows


Qt can do all of those but in your case it might be like hitting a nail with a sledgehammer, since Qt is a huge set of extensive APIs with thousands of different (well documented) classes, and focuses more on cross-platform application development. I've never used it for OpenGL, but it supports it.

If you want to check it out:
http://doc.qt.nokia.com/stable/qglformat.html#OpenGLContextProfile-enum
http://labs.qt.nokia.com/2010/01/06/qt-graphics-and-performance-opengl/

It might be overkill, but if nothing else satisfies your requirements, you can give it a shot.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!