Jump to content
  • Advertisement
Sign in to follow this  
MisteRnoOrOnha

OpenGL GLUT or native window?

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

GLUT creates native windows, but for several platforms. And there isn't really any best. GLUT gives you cross-platform and might be a bit easier to use.

Share this post


Link to post
Share on other sites
I find GLUT limiting and manually creating a native window annoying. Some other options are using SDL or SFML to handle the windowing for you.

Share this post


Link to post
Share on other sites
Personally, on BSD/Linux, I use a native window (via glx) but for Windows and Mac OS X I am quite happy with glut.

Glut is a C library which does annoy a few C++ developers but I personally prefer it (Even with C++).

Creating a native window in Windows is a little messy so GLFW or *glut is probably going to be better for you.

Some other full GUI library alternatives are...

wxWidgets - wxGLCanvas
Gtk - gtkglext

Share this post


Link to post
Share on other sites

Performance wise - Programming with the native libraries is probably the best bet. Glut has several issues such as not being able to control your main loop and how it exits. As well as some licensing issues that require the use of Freeglut. SDL/SFML/GLFW is probably the best bet if you want to make a cross platform window as these all give you control and some nice extra features. Personally i use SFML 2.0. Windows programming is very messy and un-intuitive, not to mention not cross platform (Obviously) and so i generally avoid it. I don't belive Glut has been updated in a long time either but i may be wrong. I'm quite sure that the window has little effect performance wise. It's more to do with how you develop your application. Just use whatever library you feel most comfortable with and allows you to get your applications running fast.

Share this post


Link to post
Share on other sites

I recommend neither.  The truth is that either is just fine for the basic task of creating a window; if you want to do anything else with that window (like recieve input into it or generate sound from it) then GLUT will give you a simple (and simplistic) way of doing some of that, going native will give you more comprehensive (but more complex) capabilities.

 

Performance?  It doesn't matter a damn.  This is just creating a window; once that's been done your OpenGL driver and graphics hardware take over for all rendering tasks.  The determinator of performance will be your OpenGL driver and graphics hardware, not how you created your window.

Share this post


Link to post
Share on other sites

Native on windows is a bit messy for me. I use GLFW, similar to GLUT but much nicer to use. Less features than SDL though, but that's fine with my uses.

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!