VBO 或显示列表 - GPU 兼容性

发布于 2024-11-05 02:14:05 字数 336 浏览 1 评论 0原文

我正在开发一个新的 OpenGL 应用程序,并且知道显示列表将在 OpenGL 3.1 中被弃用(以及许多其他有用的功能,(对我来说)这似乎有点愚蠢)并替换为顶点缓冲区对象。我在 NVidia 卡上使用 VBO 成功绘制了一个三角形,但该示例无法在我的上网本上的 Intel 芯片上运行,因为它不支持 glGenBuffers。 OpenGL 似乎存在一个关键缺陷(新旧 GPU/GMA 之间的兼容性破坏)。作为一家小型企业,与尽可能多的系统兼容对于我的游戏来说是必要的,但我不希望我的程序无法在较新的显卡上运行(由于它依赖于显示列表,该列表已从 OpenGL 4.1 中删除)规格)。这将为我提供对显卡(旧的和新的)最广泛的支持。显示列表或顶点缓冲区对象?

I'm working on a new OpenGL application, and am aware that display lists will be deprecated in OpenGL 3.1 (along with many other useful features, which (to me) seems kind of silly) and replaced with Vertex Buffer Objects. I successfully drew a triangle using VBOs on an NVidia card, but the example failed to run on an Intel chip on my netbook, because it does not support glGenBuffers. It seems there is a crucial flaw here in OpenGL (a compatibility breakage between newer and older GPUs/GMAs). As a small business, compatibility with as many systems as possible is necessary for my game, but I don't want my program to not work on newer graphics cards (due to its dependency on display lists, which have been removed from the OpenGL 4.1 specification). Which would give me the widest support on graphics cards (old AND new). Display lists, or vertex buffer objects?

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

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

发布评论

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

评论(3

み青杉依旧 2024-11-12 02:14:05

如果您的应用程序将在 GMA 上运行,则您的多边形数量必然较低。因此,在新显卡的驱动程序中模拟显示列表的低效率不会成为问题,它们有空闲带宽。

如果您仍然担心效率,请确保使用 glVertexPointer/glDrawArray 来最大化批量大小。这可以与显示列表结合使用,但会减少列表中单独操作的数量,从而减少仿真问题。

最坏的情况是,如果某些平台确实不支持显示列表,您可以将 glCallList 替换为函数调用。

If your application will run on GMA, you necessarily have a low poly count. So the inefficiency of having display lists emulated in the drivers for new video cards will not be a problem, they have bandwidth to spare.

If you're still concerned about efficiency, make sure to use glVertexPointer/glDrawArray to maximize batch size. This can be combined with display lists, but reduces the number of separate operations in the list and therefore makes emulation less problematic.

Worst case, if some platform really doesn't support display lists, you can replace glCallList with a function call.

蓬勃野心 2024-11-12 02:14:05

您的英特尔卡确实支持VBO,但只能通过ARB 接口。尝试 glGenBuffersARB (同时将所有其他 VBO 代码转换为使用 ARB 版本)。它将在 nVidia 和 Intel GMA 上运行。

Your Intel card does support VBOs but only through the ARB interfaces. Try glGenBuffersARB (along with converting all your other VBO code to use the ARB versions). It will work on nVidia and Intel GMA.

五里雾 2024-11-12 02:14:05

或者,您可以查询系统支持的 OpenGL 版本,并相应地使用 DisplayList 或 VBO,而不是依赖一种方法来兼容每个 OpenGL 版本。这样您就可以确定您正在使用最新、最有效和最快的绘图方式,无论系统支持哪种方法(显示列表/VBO)。

此外,这样的实现可以轻松扩展以支持未来的绘图方法,例如 OpenGL 4.4 或 OpenGL 5.0。
然而,这可能会导致多段代码在功能上做同样的事情:告诉 GPU 做什么,这可能会增加代码大小和复杂性。

Alternatively you can query for the OpenGL version supported the system and use DisplayLists or VBO's accordingly instead of relying on one method to be compatible with every OpenGL version. This way you can be certain that you are using the most up-to-date, most efficient and fastest way of drawing, whatever method (displaylists/VBO's) is supported by the system.

Also, such an implementation can be easily extended to support future drawing methods in, say, OpenGL 4.4 or OpenGL 5.0.
However, this can result in multiple pieces of code doing, functionally, the same thing: tell the GPU what to do which might increase code-size and complexity.

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