OpenGL - GLUT - Displaying different pop-up menus

六眼飞鱼酱① 提交于 2019-12-11 04:31:33

问题


In my project i want to display a two different menus based on where user press the right mouse button. I implemented picking. There is no problem here.

I want to display a menu when user right clicks an object, and a different menu when right click does not match any object(empty area in screen).

Is this possible with GLUT?


回答1:


If your application is getting sophisticated enough to require this, then you need to stop using GLUT. You've simply out-grown its capabilities.

GLUT is for simple applications. The more complex and specific your needs, the less helpful it is.


Ultimately, if you're writing a GUI application that just so happens to use OpenGL (that is, you want menus and so forth, not simply create an OpenGL window), then your options really boil down to one of two things. You can either code directly to the platform-specific windowing system. Or you can use a platform-neutral GUI system that allows you to create OpenGL windows.

wxWidgets, Qt, and FLTK are all legitimate alternatives. These seem heavyweight just for a menu, but that's what you have to do if you want platform-neutral GUI development.



来源:https://stackoverflow.com/questions/10464012/opengl-glut-displaying-different-pop-up-menus

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!