DirectX 与 OpenGL?
我看到有关 OpenGL 比 DirectX 更好的文章,而且微软实际上只是想让每个人都使用 DirectX,尽管它的性能较差,因此游戏几乎只适用于 Windows 和 XBox,但由于这篇文章是 2006 年写的今天仍然有意义吗?
我还知道很多游戏都是用 DirectX 编写的,但是有人有用 OpenGL 编写的流行游戏的示例吗?
I saw the articles that were going on about OpenGL being better than DirectX and that Microsoft are really just trying to get everyone to use DirectX even though it's inferior so that gaming is almost exclusively for Windows and XBox, but since the article was written in 2006 is it still relevant today?
Also I know plenty of games are written in DirectX but does anyone have any examples of popular games written in OpenGL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看看事实。在过去十年左右的时间里,几乎所有 PC 游戏都主要使用 DirectX。 DirectX 的早期版本(例如 DirectX 4.0)相当糟糕,但 DirectX 已经“低劣”了很长时间了。您认为微软是否会贿赂游戏开发者使用他们的 API?或者仅仅是因为他们的 API 是更好的选择?
事实上,您可以提出一个很好的论据,证明事实恰恰相反,因为 DirectX 得到了改进。直到大约两年前,OpenGL 还没有这样做。 OpenGL 陷入了可笑的过时的核心功能集,以及开发人员必须导航的一百万个扩展,其中一些在一个 GPU 上可用,另一些在另一个 GPU 上可用,有时它们兼容,有时不兼容。
从那时起,OpenGL 迅速追赶,但也仅此而已。 OpenGL 一直在追赶,而不是超速前进。
然后是工具的争论。 DirectX 为开发人员提供了令人惊叹的工具。 PIX 可以在调试方面做出令人印象深刻的事情,而且它是免费的。 PIX 只是 Microsoft 免费提供的众多工具之一。
OpenGL 有,呃……gDebugger。它可以检查一些纹理和各种 gl 对象的状态,并且需要花钱。
我不会说某个 API 比另一个 API 更好,或者更好。但在过去十年左右的时间里,有如此多的 PC 开发人员纷纷涌向 DirectX,这是有充分理由的。
Look at the facts. For the last decade or so, nearly every PC game has used DirectX primarily. Early versions of DirectX (think DirectX 4.0) were pretty awful, but it's been a long time since DirectX has been "inferior". Do you think Microsoft bribes game developers to use their API? Or could it simply be that their API was a better choice?
In fact, you could make a good argument that the opposite is true, because DirectX improved. Until around two years ago, OpenGL didn't. OpenGL was stuck with a ridiculously obsolete core feature set, and a million extensions that a developer has to navigate, some of which are available on one GPU, others are available on another, and sometimes they're compatible, sometimes they're not.
OpenGL has moved quickly to catch up since then, but that's exactly it. OpenGL has been catching up, not speeding ahead.
Then there's the tools argument. DirectX has amazing tools available for developers. PIX can do really impressive things for debugging, and it was available for free. And PIX was just one of the many tools made available for free by Microsoft.
OpenGL had, uh..... gDebugger. Which could inspect a few textures and the state of various gl objects, and it cost money.
I won't say one API is, or was better than the other. But there are very valid reasons why so many PC developers have flocked to DirectX for the last decade or so.
至少 Id software 的所有游戏(以及使用其引擎的所有游戏)使用OpenGL,如果我理解正确的话。
At least all games by Id software (and all games using their engine) use OpenGL, if I've understood correctly.