X11 来自 OpenGL 的 BadAlloc 错误
我正在使用这本书学习OpenGL。我正在尝试运行第一个示例,即 在这里。它编译得很好,但是当我尝试运行它时,我收到 X11 BadAlloc 错误:
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 128 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 38
Current serial number in output stream: 39
据我所知,此错误是在调用 glutCreateWindow 时引起的。我不知道这是 X 本身的问题还是我的显卡(nVidia geForce 310)的问题。
I'm learning OpenGL using this book. I'm trying to run the first example, which is here. It compiles fine, but when I try to run it, I get an X11 BadAlloc error:
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 128 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 38
Current serial number in output stream: 39
As far as I can tell, this error is caused when glutCreateWindow is called. I don't know if this is an issue with X itself or with my graphics card, which is a nVidia geForce 310.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的图形驱动程序不支持 OpenGL 4.0 版。
我将其更改为 3.3:
并且工作正常。您可以从
glxinfo
获取您的 OpenGL 版本。Your graphics drivers don't support OpenGL version 4.0.
I changed it to 3.3:
and it works fine. You can get your OpenGL version from
glxinfo
.