Hi, i'm starting this topic to ask what is best GLUT or native window to use with OpenGL?
GLUT or native window?
Members - Reputation: 2102
Posted 01 February 2013 - 02:16 PM
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
Members - Reputation: 129
Posted 01 February 2013 - 04:21 PM
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.
Crossbones+ - Reputation: 11901
Posted 01 February 2013 - 07:04 PM
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.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
Crossbones+ - Reputation: 8493
Posted 04 February 2013 - 09:21 AM
That said, I would advise against writing your own window manager library. Even for one platform, correct window management and OpenGL context creation is tedious. Not interesting, or important or "something you should be doing", just very tedious. Doing that on multiple platforms just makes something already annoying even more so and whatever you write will probably look very much like GLFW anyway (or simply worse).
There are scenarios where the minimalist approach is not enough, but if cross platform is still a requirement I would rather investigate SFML or even Qt if things go more in the direction of a full-scale application. Both are more heavyweight and feature-rich (much, much more in case of Qt).