简体   繁体   English

OpenGL跨平台窗口

[英]OpenGL cross platform window

I'm looking for a window... ugh... thing for OpenGL, I've been using SDL but more recently found that its not quite up to my needs in at least any code I've seen. 我正在寻找一个窗口...呃......对于OpenGL来说,我一直在使用SDL,但最近发现它至少在我见过的任何代码中都不能满足我的需求。 I'd like to find some GUI library that allows me to develop using OpenGL (and SDL if at all possible) with a menu bar, possibly options at the side, and a working-out-of-the-box close button. 我想找一些GUI库,它允许我使用OpenGL(和SDL,如果可能的话)使用菜单栏,侧面可能的选项以及开箱即用的关闭按钮进行开发。 Qt is the sort of thing I'm looking for, but I'd like to work with something that doesn't force me to make it open source. Qt是我正在寻找的那种东西,但是我想用一些不会迫使我把它变成开源的东西。

A quick list of things I want, a working close button, ability to use OGL, cross platform, any licence that doesn't force me to become open source, free, and the ability to go full screen and change resolution on the fly. 快速列出我想要的东西,工作关闭按钮,使用OGL的能力,跨平台,任何不会强迫我成为开源,免费的许可证,以及能够全天启动并随时更改分辨率的能力。

I have searched myself, I'm not a lazy person really ;) I just want to get some opinions here before I dive off into anything and find its not really suitable for my needs. 我已经搜索过自己了,我真的不是一个懒惰的人;)我只想在这里得到一些意见,然后再深入研究它并发现它不适合我的需要。

Thanks in advance for any feedback. 提前感谢您的任何反馈。

Try wxWidgets. 试试wxWidgets。 There's a link on using it with OpenGL here . 有使用它用OpenGL的链接在这里

当Qt 4.5发布时(本月晚些时候,我认为)它将是LGPL,所以如果你可以等待几周,你可以使用Qt而无需开源你的程序。

GLUT (GL Utility Toolkit) comes close to what you're looking for. GLUT (GL Utility Toolkit)接近你想要的。 It's quick and easy and cross-platform, although it does not have support for menu bars. 它既快速又简单,跨平台,但它不支持菜单栏。 This page also has a number of GLUT-like alternatives. 此页面还有许多类似GLUT的替代品。

For the out-of-the-box close-button enabled window, you can have GLUT , as mentionned before, and if your additional GUI needs are really simple, I think GLUT can provide you some. 对于开箱即用的关闭按钮启用窗口,您可以使用之前提到的GLUT ,如果您的其他GUI需求非常简单,我认为GLUT可以为您提供一些。

You could also go for simple OpenGL rendered menus and buttons, either using NVidia Widgets or AntTweakBar . 您还可以使用NVidia WidgetsAntTweakBar来获取简单的OpenGL渲染菜单和按钮。

You don't need 'support' for OGL as long as you can pass it the correct the information. 只要您能够传递正确的信息,您就不需要为OGL提供“支持”。 On windows at least, if you have a windowing API that you can hook the HWND from, you can set up OGL to use pretty much any window you want. 至少在Windows上,如果你有一个可以挂钩HWND的窗口API,你可以设置OGL来使用你想要的任何窗口。 I've done this successfully with wxWidgets and straight win32. 我用wxWidgets和win32完成了这个。 I can't help you with other platforms, but I suspect you can do something similar. 我无法帮助你使用其他平台,但我怀疑你可以做类似的事情。

This works with D3D too and is a nice way of separating your rendering code from your windowing API. 这也适用于D3D,是一种将渲染代码与窗口API分离的好方法。

SDL can create OpenGL Windows. SDL可以创建OpenGL Windows。

http://gpwiki.org/index.php/C:SDL_OGL http://gpwiki.org/index.php/C:SDL_OGL

There are numerous rendered widget libraries such as those that rotoglup suggested. 有许多渲染的小部件库,例如rotoglup建议的小部件库。 Have a peek at CEGUI and QuickGUI, they may make you happy (although CEGUI disappoints me with its abuse of XML). 看看CEGUI和QuickGUI,它们可能会让你开心(尽管CEGUI因滥用XML而让我失望)。 And here's a shameless plug: GLICT . 这是一个无耻的插件: GLICT

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM