将 LibRocket 与 SDL 和 OpenGL 集成
我目前正在参与一个游戏项目,我们达到了我们想要添加菜单和其他内容的 GUI 的地步,但是我们可能花在开发自己的系统上的时间可能会花费我们一些时间,这是一部分我们不想浪费太多时间。
因此,我们正在阅读一些 UI 库,例如 GUIchan、CEGUI 以及最近的 LibRocket,它们显然非常灵活且有用,所以我的问题是 Librocket 是否可以与 C++ 中 SDL/OpenGL 开发的项目集成?如果您知道在哪里可以找到相关信息,因为我们无法找到类似的信息。
I been currently involved in a game project and we reach the point we're want to added the GUI for menus and other stuff but the time that we maybe spent developing our own system could cost us a bit of time, and this is a part of the system that we don't want to lose too much time.
So, we're reading about some UI Libraries like GUIchan, CEGUI and recently LibRocket which apparently is very flexible and useful, so my question is if Librocket could be integrate with a project develop in SDL/OpenGL in C++? and if you know where to find information about that, because we're unable to find something like that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
librocket 旨在与任何媒体库配合使用。您需要编写一个派生自
Rocket::Core::RenderInterface
的渲染器。如果您查看示例,您会发现它们已经提供了该渲染器的 opengl 和 directx 实现。对于播放声音,没有默认支持,但您可以使用事件轻松实现它们。
librocket is designed to work with any media libraries. You need to write a renderer that derives from
Rocket::Core::RenderInterface
. If you look in the example, they already provide both opengl and directx implementation of this renderer.For playing sound, there is no default support, but you can easily implement them using events.
我已经发布了一些说明以及所需的代码将 libRocket 集成到基于 SDL 2 的应用程序中。由于您的问题在 Google 上排名很高,因此对于寻找相同问题的其他人可能会很有用。
I've posted some instructions and the code required to integrate libRocket into a SDL 2 based app. As your questions ranks high on Google it may be useful to others looking for the same thing.