OpenGL Tutorial Error

杀马特。学长 韩版系。学妹 提交于 2019-12-07 08:02:34

问题


I managed to build the tutorials from here but when executing them an error occurs:

X Error of failed request:  BadRequest (invalid request code or no such operation)
Major opcode of failed request:  154 (GLX)
Minor opcode of failed request:  34 ()
Serial number of failed request:  34
Current serial number in output stream:  33

Google told me that this error is related to the graphics driver somehow, so maybe information about my system is useful; I am using Ubuntu 12.04 64 bit on a Samsung 700Z7C notebook.


回答1:


You have:

OpenGL version string: 2.1 Mesa 8.0.4

Third page, "What You Need":

...but to execute the code, you must have a programming environment that allows OpenGL. Specifically, you will need hardware capable of running OpenGL version 3.3. ...

Samsung 700Z7C notebook:

Graphics: External or Integrated: External (Optimus)

Optimus:

When no software mechanism exists for switching between graphics adapters, the system cannot use the NVIDIA GPU at all, even if an installed graphics driver would support it.

Make sure you're routing your GLX requests to the NVidia chip (with the proprietary drivers) and not the Intel one.




回答2:


There are 3 things you should check - does your graphics card support OpenGL 3.3 (I believe that's the version used in the arcsynthesis book), are your drivers up to date, and is your code actually ok? We can probably cross 3 out, it would still help if you told us which example you were trying to run though.



来源:https://stackoverflow.com/questions/15480271/opengl-tutorial-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!