OpenGL 还是 DirectX?

OpenGL or DirectX?(OpenGL 还是 DirectX?)
本文介绍了OpenGL 还是 DirectX?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我知道这可能是一个非常主观的问题,但我只想从最容易和最快学习的一个开始,这样我就可以尽快开始我的一个小项目,aa小 2D 游戏,至少从...开始.. 你会推荐我玩哪一个?我正在使用 C++

I know this is probably a very subjective question, but I just want to start with the one which is the easiest and fastest to learn, so that I can get started with a small project of mine as fast as possible, it's a a little 2D game, to start with at least.. Which one would you recommend me to go with? And I'm using C++

推荐答案

第一个问题:您使用的是 Windows 吗?如果没有,请使用 OpenGL.

First question: Are you on Windows? If not, use OpenGL.

如果您使用的是 Windows,这将归结为品味问题.API 不同,但 OpenGL 和 DirectX 所需的概念非常相似.大多数东西都支持,尽管它们的工作方式略有不同.

If you're on Windows, this will come down to a matter of taste. The APIs are different, but the concepts required are very similar for both OpenGL and DirectX. Most things are supported on both, although they do work a bit differently.

Microsoft 提供了相当多的示例和一个可用于 DirectX(9 或 10)的不错的框架,可以使您更容易上手.

Microsoft provides quite a few samples and a decent framework you can use for DirectX (9 or 10), which can make it easier to get started.

话虽如此,如果您只针对 Windows Vista/Win7,迁移到 DirectX 10 可能会让生活更轻松.DX9 及更早版本中的很多烦恼在 DX10 中都被移除了,API 更干净了一些.

That being said, if you're targetting Windows Vista/Win7 only, moving to DirectX 10 may make life easier. A lot of the annoyances in DX9 and earlier were removed in DX10, and the API is a bit more clean.

话虽如此,如果这是用于游戏,我建议您考虑使用像 Ogre 而不是直接在 DirectX 或 OpenGL 中编写.这将使您的生活变得更加简单,尤其是在学习期间.

That being said, if this is for a game, I'd recommend looking at using a middleware engine like Ogre instead of writing directly in DirectX OR OpenGL. This will make your life much simpler, especially while learning.

这篇关于OpenGL 还是 DirectX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

OpenGL transforming objects with multiple rotations of Different axis(OpenGL 变换不同轴多次旋转的对象)
GLFW first responder error(GLFW 第一响应者错误)
SOIL not linking correctly(SOIL 连接不正确)
Core profile vs version string? Only getting GLSL 1.3/OGL 3.0 in mesa 10.0.1(核心配置文件与版本字符串?在 mesa 10.0.1 中只获得 GLSL 1.3/OGL 3.0)
What is the range of OpenGL texture ID?(OpenGL 纹理 ID 的范围是多少?)
How taxing are OpenGL glDrawElements() calls compared to basic logic code?(与基本逻辑代码相比,OpenGL glDrawElements() 调用的繁重程度如何?)