Qt 或 wxWidgets

发布于 2024-12-02 01:02:41 字数 1455 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

破晓 2024-12-09 01:02:41
  1. 是的,只要您不静态链接到它们(即:将它们用作 DLL)。虽然 wxWidgets 允许您静态链接而不成为 GPL。

  2. 以上都不是。如果您正在制作 3D 游戏,那么这些都无法满足您的需求。游戏的 GUI 需求与典型桌面应用程序的 GUI 需求非常不同。在游戏中,您希望特定的 GUI 元素与特定的艺术方向保持一致,而不是与桌面环境保持一致。另外,您可能希望 GUI 元素比这些工具包通常允许的更具表现力。

    正是由于这样的原因,CEGUI 才存在。那是一个针对游戏需求而设计的GUI系统。

    此外,这些都没有以游戏通常想要处理输入的方式提供输入。您通常希望游戏的级别低于这些工具包提供的级别。这就是 SDL 和 SFML 等项目存在的原因。

  1. Yes, so long as you don't statically link to them (ie: use them as DLLs). Though wxWidgets allows you to statically link without becoming GPL'd.

  2. None of the above. If you are making a 3D game, then none of these is good for your needs. The needs of a GUI for a game are very different from the needs of a GUI for a typical desktop application. In a game, you want you particular GUI elements to be consistent with a particular artistic direction, not be consistent with the desktop environment. Plus, you may want your GUI elements to be more expressive than what these toolkits would normally allow.

    It is for reasons like this that CEGUI exists. That is a GUI system designed for the needs of a game.

    Also, none of these provide input the way a game generally wants to process it. You typically want something lower level for a game than what these toolkits provide. That's why projects like SDL and SFML exist.

情场扛把子 2024-12-09 01:02:41

1 - 是的,前提是您的项目不需要更改库本身

2 - 我强烈推荐 Qt 用于新的窗口应用程序,如果没有其他原因,只是它有优秀文档(尽管还有许多其他获胜点,但它很快就会变得主观)。 GTK 和 WxWidgets 都会让你浪费精力去思考那些你根本不应该考虑的事情。 Qt 更容易 a) 定制,b) 当你不关心定制时可以忽略。

尽管对于 3D 内容,您可能需要研究成熟的引擎,例如 Ooh、Irrlicht 或 Ogre3D 或任何其他引擎

1 - Yes, provided that your project doesn't require alteration of the library itself

2 - I strongly reccommend Qt for new windowed apps, if for no other reason than it has excellent documentation (although there are many other winning points, but it gets subjective quite quickly). GTK and WxWidgets will both make you waste mental energy thinking about things you really shouldn't have to think about. Qt is easier to a) customise, and b) ignore when you don't care about customisation.

Although for 3D stuff you might want to look into full-blown engines like, ooh, Irrlicht or Ogre3D or any of a number of others

坠似风落 2024-12-09 01:02:41

WxWidgets 使用 LGPL,这意味着您可以在项目中动态链接到它,而不会强制您的项目采用 GPL 或 LGPL。

但是,我建议对于任何游戏或渲染应用程序使用 CEGUI 而不是您建议的库

CEGUI 使用 MIT 许可证,该许可证不如 LGPL 严格,并且还允许您动态(首选)或静态链接到库,两者都不会强迫您为自己的项目拥有特定许可证。

  • 支持 OpenGL 3.2+ Core Profile (OpenGL3 Renderer)
  • 支持非常老的 OpenGL 版本 (OpenGL Renderer)
  • 如果你想使用 Ogre 或 Irrlicht 引擎,它们也可以依赖 OpenGL,CEGUI 也支持这两个通过 CEGUIOgreRenderer 和 CEGUIIrrlichtRenderer 渲染器
  • 支持 Windows、Linux 和 Mac OS X,正如您所愿
  • 因为有人在评论中问:Unicode 字符完全支持,以便您可以使用希伯来语、阿拉伯语、各种亚洲字母等,如当前字体演示所示 - 当然您需要安装其中一种 CEGUI 字体或使用另一种
  • 专门设计的 开源字体用于游戏、模拟和渲染应用程序
  • 您可以为 UI 中的所有元素设置外观(目前仅通过 XML,很快也可以使用编辑器)
  • 免费提供强大的编辑器 (CEED),用于使用所见即所得 (!) 进行布局编辑!
  • 通过 C++ 代码和/或 XML 的更改是完全可扩展和自适应的
  • 强大的事件系统

设置 CEGUI 及其依赖项并使其与您的项目一起运行可能需要一些时间,但它仍然会从长远来看是有回报的,因为它比大多数免费的 UI 解决方案具有更多的功能。想象一下,如果您使用了一个 UI 库,然后发现它没有提供您需要的特定功能,并且几乎不可能添加此功能,那将是多么烦人——因为 CEGUI 基于 C++ 和 XML,并且由于其设计,您始终可以向 CEGUI 添加特定的调整。因此,即使从长远来看,您也很可能不会遇到限制。此外,它已经具有许多开箱即用的功能 - 比同类库更多。

WxWidgets uses LGPL which means you can dynamically link to it in your project, without it forcing your project to be GPL or LGPL.

However, I suggest using CEGUI instead of the libraries you suggested, for any game or rendering application

CEGUI uses the MIT license which is less strict than LGPL and also allows you to link to the library dynamically (preferred) or statically, both without forcing you to have a specific license for your own project.

  • Supports OpenGL 3.2+ Core Profile (OpenGL3 Renderer)
  • Supports very old OpenGL versions (OpenGL Renderer)
  • If you want to use Ogre or Irrlicht engine, which can also rely on OpenGL, CEGUI also supports these two renderers via the CEGUIOgreRenderer and CEGUIIrrlichtRenderer
  • Ssupports Windows, Linux and Mac OS X, just as you want
  • Because someone asked in the comments: Unicode characters are fully supported so that
    you can use Hebrew, Arabic, all sort of Asian alphabets, etc, as shown in the current Font Demo - of course you need to install either one of the CEGUI fonts or use another Open Source Font
  • Was specifically designed for games, simulation and rendering applications
  • You can skin all elements in the UI (currently only via XML, soon also using an editor)
  • Provides a powerful editor (CEED) for layout editing with WYSIWYG (!) for free!
  • Is fully extendable and adaptive via changes in C++ code and/or XML
  • Powerful Event System

It might take a bit to set CEGUI and its dependencies up and get it to run with your project but it will still pay off on the long run because it has a lot more features than most free solutions for UI. Imagine how annoying it would be if you used an UI library and then found out it does not provide a specific feature you need and that it would be almost impossible to add this - because CEGUI is based on C++ and XML and because of its design, you can always add specific adjustments to CEGUI. So you will most likely not run into limitations even on the long run. Also it already has a lot of features out of the box - more than comparable libraries.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文