用于空间模拟器的 OpenGL

发布于 2024-08-13 08:22:14 字数 1539 浏览 5 评论 0原文

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

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

发布评论

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

评论(6

山人契 2024-08-20 08:22:14

考虑使用开源 3d 引擎,例如 Ogre3DIrrlicht。这样你就可以专注于制作游戏:内容、游戏玩法。

两个引擎都定义了一个可以映射到 Direct3D 或 OpenGL 后端的抽象层。

编辑:起初我没有注意到你提到了 Java,无论如何两个引擎都支持 Java 绑定。

Consider using an open source 3d engine like Ogre3D or Irrlicht. This way you can focus on making a game: content, gameplay.

Both engines define an abstraction layer that can map to Direct3D or OpenGL backends.

EDIT: at first I didn't notice you mentioned Java, anyway both engines support Java bindings.

江南烟雨〆相思醉 2024-08-20 08:22:14

如果您决定学习低级图形编程而不是使用 Ogre3D 或 Irrlicht 等高级 3D 引擎,我建议从 OpenGL ES 2.X 开始,它是 OpenGL 的子集。

OpenGL ES 2.X 是 OpenGL 的简化子集,适用于具有可编程硬件(例如手机)的嵌入式系统。例如,在 OpenGL 中可能有多种方法来完成任务,但在 Open GL ES 2.X 中,只有一种方法。由于 OpenGL ES 2.X 中的选择较少,因此要掌握 OpenGL ES 2.X 需要学习的内容也少得多。 OpenGL ES 2.0编程指南有480页,OpenGL编程指南第七版有936页。

此外,使用 OpenGL ES 2.X 将为您的游戏带来更广泛的硬件受众。由于它是 OpenGL 的子集,因此为 OpenGL ES 2.X 编写的代码无需修改即可在完整的 OpenGL 系统上运行。您的游戏图形可以在从台式机到智能手机的一系列目标机器上运行。

If you decide to learn the low level graphics programming instead of using a higher level 3d engine like Ogre3D or Irrlicht, I recommend starting with OpenGL ES 2.X, which is a subset of OpenGL.

OpenGL ES 2.X is a simplified subset of OpenGL for embedded systems with programmable hardware such as phones. For example, in OpenGL there may be multiple ways to accomplish tasks, but in Open GL ES 2.X, there's only one way. Because there's less choice in OpenGL ES 2.X, there's so much less to learn to master OpenGL ES 2.X. The OpenGL ES 2.0 Programming Guide is 480 pages, and the OpenGL Programming Guide, Seventh Edition is 936 pages.

Furthermore, using OpenGL ES 2.X will give you a wider hardware audience for your game. Because it is a subset of OpenGL, code written for OpenGL ES 2.X will work on a full OpenGL system with little or no modification. Your game's graphics can work on a range of target machines from desktops to smart phones.

叶落知秋 2024-08-20 08:22:14

您可以选择开源 3D 引擎,例如 Ogre3D

但如果您真的想自己编写图形引擎(非常有趣),请从学习线性代数开始。不是很高级的东西,但你应该很舒服地用平移向量、旋转矩阵等表达自己。

如果您已经熟悉这些概念,请选择 Direct3D 或 OpenGL - 这更多地取决于可用的平台。如果您喜欢在 Mircosoft 环境中编码,请选择 Direct3D,其他一切请选择 OpenGL。

附加库的选择取决于编程语言。比 GLUT 更好的替代方案可能是 SDL (C) 或 Qt(C++)。

You could choose an open source 3D engine like Ogre3D.

But if you really want to write the graphics engine on your own (quite interesting), start by learning linear algebra. Not the quite advanced stuff, but you should be very comfortable with expressing yourself in translation vectors, rotation matrices and the like.

If you already familiar with those concepts, choose either Direct3D or OpenGL - this depends more on the available platform. If you like to code in a Mircosoft Environment, choose Direct3D, everything else, choose OpenGL.

The choice of additional libraries depends on the programming language. Better alternatives than GLUT are probably SDL (C) or Qt(C++).

漆黑的白昼 2024-08-20 08:22:14

好吧,如果您以前从未进行过 3D 图形编程,请尽量简单并边学边学。
NeHe(Neon Helium)曾经有一套非常好的 OpenGL 教程,这就是我采取的路线。

Well, if you've never done 3D graphics programming before, go for simplicity and learn-as-you-go.
There used to be a set of really nice tutorials by NeHe (Neon Helium) for OpenGL, which was the route I took.

有深☉意 2024-08-20 08:22:14

我发现 OpenGL 更容易上手,因为学习曲线不是那么陡峭。您可以快速获得结果,这对消除最初的挫败感/动力有很大帮助。大量的帮助等等。不过,警告的话 - 3D 编程本质上很复杂,你会在构建图形技术上花费比游戏本身更多的精力。如果你真的想看到游戏完成,请考虑采用 Ogre3D :o)(免责声明:我知道还有其他引擎,但 Ogre 很稳定,经过验证,并附带良好的文档)

I found OpenGL easier to start with as learning curve is not so steep. You can get quick results which helps a lot with initial frustration/motivation. Tons of help etc. Words of warning though - 3D programming is inherently complex and you'll spend more energy on building graphics technology than game itself. Consider adopting Ogre3D if you really want to see the game finished :o) (disclaimer: I know there are also other engines but Ogre is stable, proven and comes with good documentation)

把昨日还给我 2024-08-20 08:22:14

如果您想保持平台独立性,DirectX 就不行,因为它仅限于 Microsoft Windows 平台

If you want to stay platform-independent DirectX won't do as it is restricted to Microsoft Windows Platforms

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