开发者

X11 BadAlloc Error from OpenGL

开发者 https://www.devze.com 2023-03-07 02:40 出处:网络
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:

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

精彩评论

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