开始 3D 编程/OpenGL

发布于 2024-11-04 20:58:03 字数 455 浏览 4 评论 0原文

我对 C / C++ / java 相当熟悉,但我大多只做过命令行编程(java 中的 GUI 除外)。

我对 3D 编程非常感兴趣,但我遇到的问题是我觉得我知道的太少,我什至不知道从哪里开始,所以我很难搜索上述资源。

我希望有人能为我指明正确的方向,让我可以开始使用一些资源/教程。

我了解两个大平台是OpenGL和Direct3d。我的问题是学哪个“更好”?

我最初是从一些 OpenGl 开始的,在 http://nehe.gamedev.net 上有一些教程,但后来我发现那里的大部分东西都已经贬值/风格不好。

然后我了解到OpenGL的最新版本是4.x,而我的刚用了一年的VG卡只支持OpenGL 2.x(HD 4890)。

我想学习如何基本上“行走”通过一些 3 维环境,例如迷宫。

I'm fairly familiar with C / C++ / java, but I have mostly only ever done command line programming (with the exception of GUI in java).

I am really interested in 3D programming, but the problem I am having is I feel I know so little that I'm not even sure where to start so I am having difficulty searching for said resources.

I was hoping someone could point me in the right direction as to some resources / tutorials to get started.

I understand the two large platforms are OpenGL and Direct3d. My questions is which would be "better" to learn?

I originally started with a little OpenGl with some tutorials at http://nehe.gamedev.net but I later found out that most of the stuff there is depreciated / bad style.

I then learned the most recent version of OpenGL is 4.x, and my barely a year old VG card only supports OpenGL 2.x (HD 4890).

I would like to learn how to basically "walk" through some 3 dimensional environment, e.g. a maze.

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

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

发布评论

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

评论(5

没︽人懂的悲伤 2024-11-11 20:58:03

我个人没有使用过 OpenGL,我只通过 XNA 使用过 DirectX,但据我所知,OpenGL 比 DirectX 更容易学习(更不用说跨平台了),所以这可能是一个更好的开始。您不必担心很多事情,例如以特殊格式创建纹理(例如使用 Maya);你可以只使用 JPEG 文件或其他文件来让它工作。我听说 Java Monkey Engine 很好。

如果您使用的是 Windows 并且交叉兼容性不是问题,那么一定要尝试一下 Microsoft XNA Game Studio,它对于开始游戏编程来说很棒 - 快速但简单且功能强大。 (虽然您需要学习 C#,但这应该很容易,因为您有足够的经验。)

I personally haven't worked with OpenGL, and I've only worked with DirectX through XNA, but from what I know, OpenGL is a somewhat easier than DirectX (not to mention cross-platform too) to learn, so that might be a better start. You don't have to worry about so many things like creating textures (e.g. with Maya) in a special format; you can just use a JPEG file or something to get it to work. I hear the Java Monkey Engine is good.

If you're using Windows and cross-compatibility isn't an issue though, certainly give Microsoft XNA Game Studio a try, it's great for beginning game programming -- fast but easy and powerful. (You'd need to learn C# though, but it should be easy, since you have more than enough experience.)

蓬勃野心 2024-11-11 20:58:03

如果您对 3D 编程而不是底层的 OpenGL/DirectX 更感兴趣,我会开始使用某种框架或游戏引擎,例如 XNA,这样您就不必(那么多)担心低级的东西。然而,如果你想学习 OpenGL 或 DirectX,我会从 2D 开始,因为它仍然会教你 API,但会更简单(因为你不必同时处理 3D 和 API) ),尽管如果您只是制作一个简单的迷宫游戏(正如您所说),您可以逃脱这一点。

对于现代 OpenGL,最新的 SuperBible 涵盖了它; http://www.arcsynthesis.org/gltut/ 涵盖了它;和 http://www.swiftless.com/opengltuts/opengl4tuts.html 覆盖它以及。

要回答 OpenGL 还是 DirectX 哪个更好,如果您对 XNA/Xbox/Windows Phone 中的任何一个或仅感兴趣,请选择后者,如果您使用 Linux/想要编写跨平台游戏,请选择前者。我认为新版本的 OpenGL 无论如何都与 DirectX 类似。

https://gamedev.stackexchange.com/ 或许可以帮助你;有很多针对初学者的问题;请参阅https://gamedev.stackexchange.com/search?q=beginner
http://www.gamasutra.com/blogs/LewisPulsipher/20110516/ 7453/So_Youre_Going_To_Make_A_Game_For_The_Very_First_Time.php 也提供了一些很好的建议(尽管它是针对游戏而不是 3D 编程)

If you're more interested in 3D programming and not the underlying OpenGL/DirectX, I would start using some sort of framework or game engine, e.g. XNA, so that you're not worrying (as much) about low-level stuff. However, if you want to learn OpenGL or DirectX, I would start with 2D because it will still teach you the API, but it will be simpler (because again you're not having to deal with both 3D and an API at the same time), though you could get away with this if you're just making a simple maze game (as you say).

For modern OpenGL, the newest SuperBible covers it; http://www.arcsynthesis.org/gltut/ covers it; and http://www.swiftless.com/opengltuts/opengl4tuts.html covers it as well.

To answer whether OpenGL or DirectX is better, choose the latter if you're interested in any of or solely XNA/Xbox/Windows Phone, and the former if you're using Linux/want to write cross-platform games. I think the newer versions of OpenGL are similar to DirectX anyways.

https://gamedev.stackexchange.com/ can probably help you; there are a lot of questions aimed at beginners; see https://gamedev.stackexchange.com/search?q=beginner.
http://www.gamasutra.com/blogs/LewisPulsipher/20110516/7453/So_Youre_Going_To_Make_A_Game_For_The_Very_First_Time.php also gives some nice advice (though its for game and not 3D programming)

殤城〤 2024-11-11 20:58:03

OpenGL 和 DirectX 有很多共享的概念,但如果你想跨平台,那么 OpenGL 肯定是更好的选择。特别是如果您想针对较新的平台(例如 Android 或 WebGL)。

您可能会发现从现成的 3D 引擎开始比从“原始”OpenGL 开始更容易。一些帮助您入门的选项:

OpenGL and DirectX share a lot of concepts, though if you want to be cross-platform, then OpenGL is certainly the better choice. Especially if you want to target newer platforms such as Android or WebGL.

You will probably find it easiest to start with a ready-made 3D engine rather than starting out with "raw" OpenGL. Some options to get you started:

  • If you have Java experience, it might be a good idea to check out jMonkeyEngine. It's a fully fledged OpenGL game engine (uses LWJGL under the hood, supports bullet physics, shader architecture, full SDK etc.) and it comes with some good example code.
  • On the C++ side, I heard good things about Ogre3D and Irrlicht in the past.
  • There's a big list of game engines on Wikipedia
安静被遗忘 2024-11-11 20:58:03

我真的会从 XNA 开始。
已经有一些很好的 3D 库和教程。

例如 http://msdn.microsoft.com/ en-us/library/bb197293%28v=xnagamestudio.31%29.aspx
http://www.nfostergames.com/XNAQuickStartEngineWalkthrough.htm

和库示例:

http://quickstartengine.codeplex.com/< /a>

I really would start with XNA.
There are already some good 3D libraries and tutorials out there.

e.g. http://msdn.microsoft.com/en-us/library/bb197293%28v=xnagamestudio.31%29.aspx
http://www.nfostergames.com/XNAQuickStartEngineWalkthrough.htm

And Library example:

http://quickstartengine.codeplex.com/

淡笑忘祈一世凡恋 2024-11-11 20:58:03

这个: http://www.amazon.com/Introduction-Game-Programming-Direct- 9-0c/dp/1598220160 是一本学习使用 DirectX 的“现代”(又名基于着色器)图形编程的好书。还有一个较新的 DX10 版本,我确信它也不错,但我还没有真正看过它。

我不知道有一本类似的 OpenGL 书,也许其他人可以推荐一本。一旦掌握了基本概念(顶点缓冲区、着色器、渲染状态等),在 GL 和 DX 之间移动并不是很困难,因为它们基本上都是相同图形硬件的接口。

This: http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160 is a great book for learning "modern" (aka shader based) graphics programming with DirectX. There's also a newer DX10 edition that I'm sure is good as well but I have not actually looked at it.

I'm not aware of an equivalent OpenGL book, maybe somebody else can suggest one. Once you master the basic concepts though (vertex buffers, shaders, render states, etc) it's not very difficult to move between GL and DX since they're both basically interfaces to the same graphics hardware.

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