开发者

X11 BadAlloc Error from OpenGL

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 o开发者_JAVA百科f 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.


Your graphics drivers don't support OpenGL version 4.0.

glutInitContextVersion(4, 0);

I changed it to 3.3:

glutInitContextVersion(3, 3);

and it works fine. You can get your OpenGL version from glxinfo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜