我的 OpenGL 版本不支持缓冲区绑定
这是为什么呢?我想知道,因为在我在互联网上看到的大量文章和各种教程中,很难不看到不涉及缓冲区绑定的内容。我唯一的绑定函数是glBindTexture。这是否意味着我的驱动程序明显过时了?
编辑
抱歉,缺少信息。我的 OpenGL 版本 3.1 来自 Intel 集成 GPU。另外,我认为我缺少诸如 glBindBuffer
之类的函数的原因主要是因为它不会作为我可以在自动完成中使用的函数显示在 Qt 中。
Why is this? I'd like to know because in a LOT of articles and various tutorials I see on the Internet it's hard NOT to see something which doesn't deal with buffer binding. The only bind function I have is glBindTexture
. Does this mean my drivers are significantly outdated?
Edit
Sorry for lack of information. My OpenGL version 3.1 from an Intel integrated GPU. Also, the reason why I thought that I lacked functions such as glBindBuffer
is mainly because it wouldn't show up in Qt as a function I could use in my auto-completion.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您很可能被 OpenGL 实现导出其功能的方式所愚弄。 Windows 上的 opengl32.dll 和 libGL.so 很可能只会为您提供 OpenGL-1.1 功能(Windows Vista 和/实际上确实为您提供 OpenGL-1.4,大多数 Linux/BSD 驱动程序将为您提供 OpenGL-2.1)。任何超出的内容(以及超出的缓冲区对象)都必须通过所谓的扩展系统加载。
最简单可靠的方法:
#include
替换为#include
glewInit()
。Most likely you're fooled by the way OpenGL implementations export their functionality. opengl32.dll on Windows will and libGL.so most likely will give you only OpenGL-1.1 functionality (Windows Vista and / actually do give you OpenGL-1.4 and most Linux/BSD drivers will give you OpenGL-2.1). Anything beyond (and buffer objects go beyond) must be loaded through the so called extension system.
Most easy and reliable way to do this:
#include <GL/gl.h>
with#include <GL/glew.h>
glewInit()
in your code after a OpenGL context has been made current.