0
\$\begingroup\$

I'm new to OpenGL

Lets say I create an OpenGL window using glfw and I need the UI feature from glut (such as popup menu). Is it possible to use glfw and glut in one program?

Thank you

\$\endgroup\$
0
\$\begingroup\$

GLUT is just a quick and dirty way to get an os window open, create a gl context for it and handle basic input events. It also includes some UI features like popup menus and other window-ui related features

GLFW can do everything GLUT does, except for ui stuff. It has a much better structure, a callback system and different context options on the majority of platforms, at the cost of a more complex and verbose api.

I'd suggest you to evaluate what the application requirements are in your case, and then choose the best option.

Do you want more flexibility at the cost of ui features? use GLFW. Do you want less flexibility at the cost of ui features? use GLUT.

Alternatively, you can always use QT, GTK and other cross-platform ui toolkits.

So yes you can, but probably shouldn't.

\$\endgroup\$
  • \$\begingroup\$ Thank you for your answer. I see, so there are some toolkits to support GLFW. I'm sorry I'm really new to this kind of computer graphic stuff. Earlier today, I also found AntTweakBarGLFW3, so maybe I'll try that first. Once again, thanks for your clear explanation. \$\endgroup\$ – Ricky Dec 25 '18 at 13:42

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.