I’m trying to add a window to my OpenGL program. So far most of my rendering has been off-screen, and the context created for that didn’t have to deal with too many windowing-system issues.
There’s a window coming up, and I can draw to it, but there are things like mouse-overs pause execution, and the window stops responding if it’s moved to the background.
I’m on XP64 and using WGL, incidentally, but I’d like whatever I come up with to be easily portable to Unix.
I’m looking for a free windowing system that I can get working fast----no annoyingly complex build process or linking issues.
I need functions to:
CreateWindow(w,h)
SwapBuffers()
and preferably also a function to toggle the window visible/invisible (probably cheaper than destroying/recreating).
Any suggestions?
GTK+ doesn’t seem to have built-in OpenGL support, although there are some addon packages that do. Qt’s open source version doesn’t seem to include Windows support.
If you only need full window 3D, no widget and nothing fancy, then SDL is definitely the simplest library to use: http://libsdl.org
Still it won’t have a “show/hide this window” feature.
On the other hand if you do need gui, menus, widgets and the like, I recommand Fltk which has built-in OpenGL support and which is much easier to use than GTK and the others. It’s surprisingly simple to use, yet it is used in professional environments like Lucasfilm tools. http://en.wikipedia.org/wiki/Fltk http://www.fltk.org