OpenGL的 - GLUT - 显示不同的弹出菜单 [英] OpenGL - GLUT - Displaying different pop-up menus

查看:449
本文介绍了OpenGL的 - GLUT - 显示不同的弹出菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目,我想基于这样来显示两个不同的菜单用户preSS鼠标右键。我实现了采摘。这里也没有问题。

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).

这可能与GLUT?

推荐答案

如果您的应用程序越来越复杂的足够的需要的这一点,那么你需要停止使用GLUT。你只需出生长的能力。

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是简单的应用程序。更复杂和更具体的您的需求,就越有帮助它。

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

最后,如果你正在写一个GUI应用程序,它恰好使用OpenGL(也就是你想要的菜单等等,而不仅仅是创建一个OpenGL窗口),那么你的选择真的归结为以下两种情况之一。您可以code直接向特定于平台的窗口系统。或者你可以使用一个平台中立的GUI系统,让您创建的OpenGL窗口。

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的 FLTK 都是合法的替代品。这些似乎重量级只是一个菜单,但这是你有,如果你想与平台无关的GUI开发做什么。

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.

这篇关于OpenGL的 - GLUT - 显示不同的弹出菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆