要使用哪个版本的OpenGL? [英] Which version of OpenGL to use?

查看:337
本文介绍了要使用哪个版本的OpenGL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前运行一个机器,允许我在OpenGL 2.1中编程。如果我是一个程序,我应该使用当前OpenGL版本的权力,如3.x / 4.x或使用2.1?

I currently run a machine that allows me to program in OpenGL 2.1. If I were to make a program, should I use the power of the current OpenGL versions like 3.x/4.x or use 2.1?

另一个问题: >升级我的视频卡允许我在升级版本的OpenGL中编程?

On another side question: does only upgrading my video card allow me to program in upgraded versions of OpenGL?

推荐答案

OpenGL版本(适用于AMD和NVIDIA GPU)对应于硬件的水平。 2.x OpenGL版本适用于DX9级硬件。 3.x表示DX10级别,4.x表示DX11级别硬件。因此,您选择的版本限制您可以运行您的代码。

OpenGL versions (for AMD and NVIDIA GPUs) roughly correspond to levels of hardware. 2.x OpenGL versions are for DX9-level hardware. 3.x represents DX10-level, and 4.x represents DX11-class hardware. So the version you pick restricts you can run your code.

一般来说,任何AMD或NVIDIA GPU可以实际购买新的商店将是3.x或更好(更可能,4.x)。甚至集成的GPU,主板或CPU,从AMD是3.x或更好。我在HD 3300主板GPU上做了一些家庭开发工作,工作得相当不错。

In general, any AMD or NVIDIA GPU you can actually buy new from a store will be 3.x or better (more than likely, 4.x). Even integrated GPUs, motherboard or CPU, from AMD are 3.x or better. I do some home development work on an HD 3300 motherboard GPU, and it works reasonably well.

英特尔是个问题。英特尔的OpenGL驱动程序质量相当差。许多老英特尔机器只能支持GL 1.4,这是DX9之前的类功能。它们支持一些更高级别的扩展(着色器,但只有顶点着色器,因为它们在软件中运行)。

Intel is a problem. Intel's OpenGL driver quality is pretty poor. Many old Intel machines can only support GL 1.4, which is pre-DX9 class functionality. They do support some higher-level extensions (shaders, but only vertex shaders, since they run them in software).

更新的英特尔GPU更好一些, GL驱动程序仍然比较麻烦。

More recent Intel GPUs are a bit better, but their GL drivers are still rather buggy.

上面描述了Windows的情况。 Linux有点模糊,因为有来自NVIDIA / AMD的驱动程序和开源社区写的驱动程序。后者通常不是那么好,但它们正在改善。这些都是3.x级硬件。

The above describes the situation for Windows. Linux is a bit fuzzier, because there are drivers from NVIDIA/AMD, and open-source community written drivers. The latter are generally not as good, but they are improving. These tend to be for 3.x-class hardware.

MacOSX世界有点不同。 Mac OSX Lion(10.7),最近发布,增加了对OpenGL 3.2的支持(可悲,不是3.3,由于某种原因)。苹果严格控制OpenGL在他们的平台上的工作方式,但希望他们将更新频繁比最近更新的GL版本。

The MacOSX world is a bit different. Mac OSX Lion (10.7), recently released, adds support for OpenGL 3.2 (sadly, not 3.3, for some reason). Apple rigidly controls how OpenGL works on their platform, but hopefully they will be updating GL versions more frequently than they have been recently.

在Mac上,你真的有两个选择:2.1或3.2。请注意,Lion 3.2的支持只公开了核心 OpenGL功能。有关详细信息,请参见此页

So on Macs, you really have two choices: 2.1 or 3.2. Note that Lion's 3.2 support only exposes core OpenGL functionality. See this page for details on what that means.

您不能告诉你的特定计算机能够的最高版本。有简单的版本,你得到当你创建一个上下文。一般来说,除非你特别要求一个版本(甚至那么,通常不是),你会得到你的硬件和驱动程序可以处理的最高版本。

You cannot tell what the highest version your particular computer is capable of. There is simply the version you get when you create a context. In general, unless you specifically ask for a version (and even then, usually not), you will get the highest version your hardware and drivers can handle.

是的:OpenGL版本由您的视频卡的功能(和已安装的驱动程序)控制。

Oh, and yes: the OpenGL version is controlled by your video card's capabilities (and installed drivers).

以下建议假设您正在开发一个严重的应用程序,使用。这不是为了小的演示应用程序或任何。

The following advise assumes that you're developing a serious application that you intend for others to use. This isn't for little demo apps or whatever.

一般来说,我建议反对显式限制您的代码为4.x.虽然4.x的采用每天增加(有从NVIDIA和AMD的支持4.x支持的2个硬件代,第三个可能将从年底结束AMD)。此外,AMD开始嵌入4.x能力的GPU在他们的CPU现在),仍然有很多3.x硬件。 4.x不会买你一大笔,你可以很容易地添加代码路径有条件地支持4.x功能,如果他们可用。

In general, I would advise against explicitly restricting your code to 4.x. While 4.x adoption increases every day (there are 2 hardware generations from both NVIDIA and AMD with 4.x support, and a third likely will be out by years end from AMD. Also, AMD is starting to embed 4.x capable GPUs in their CPUs now), there is still a lot of 3.x hardware. 4.x doesn't buy you a whole lot, and you can easily add code paths to conditionally support 4.x features if they are available.

这篇关于要使用哪个版本的OpenGL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆