2017-10-17 5 views
0

PyOpenGLをインストールして、this tutorialで練習を進めました。これは、ウィンドウを作成し、このシンプルなコードで始まる:libGLエラー - UbuntuでOpengGLコードでドライバをロードするには

from OpenGL.GL import * 
from OpenGL.GLUT import * 
from OpenGL.GLU import * 

window = 0            # glut window number 
width, height = 500, 400        # window size 

def draw():           # ondraw is called all the time 
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # clear the screen 
    glLoadIdentity()         # reset position 

    # ToDo draw rectangle 

    glutSwapBuffers()         # important for double buffering 


# initialization 
glutInit()            # initialize glut 
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH) 
glutInitWindowSize(width, height)      # set window size 
glutInitWindowPosition(0, 0)       # set window position 
window = glutCreateWindow("noobtuts.com")    # create window with title 
glutDisplayFunc(draw)         # set draw function callback 
glutIdleFunc(draw)          # draw all the time 
glutMainLoop()  

しかし、私はそれを実行しようとすると、エラーのこのセットを取得:

An error ocurred while starting the kernel 
libGL error: unable to load driver: nouveau_dri.so 
libGL error: driver pointer missing 
libGL error: failed to load driver: nouveau 
libGL error: unable to load driver: swrast_dri.so 
libGL error: failed to load driver: swrast 
X Error of failed request: GLXBadContext 
Major opcode of failed request: 155 (GLX) 
Minor opcode of failed request: 6 (X_GLXIsDirect) 
Serial number of failed request: 43 
Current serial number in output stream: 42 
X Error of failed request: BadValue (integer parameter out of range for operation) 
Major opcode of failed request: 155 (GLX) 
Minor opcode of failed request: 24 (X_GLXCreateNewContext) 
Value in failed request: 0x0 
Serial number of failed request: 42 
Current serial number in output stream: 43 

誰かが、彼らが何を意味するかまたはどのように私を導くことができますそれを修正しますか?

この問題についてインターネット上で議論がいくつかありますが、私は強力な解決策を見つけられませんでした。私は途中でUbuntu 16を使用しています。ありがとう

答えて

0

これは、独自のドライバをインストールしたことがあり、その後に物事が壊れたようです。新しくインストールしたNVDIAドライバをアンインストールして再インストールする必要があります。次に、メインウィンドウでアプリケーションを検索し、インストールしたドライバをそのウィンドウに追加します。

それができない場合

nouveau_dri.so見つける ""これで解決しないと、あなたはどんな追加のドライバをインストールしていない場合は、端末上で次のコマンドを入力してください、あなたはこのファイル

を持っているかどうかを確認それをインストールするとエラーを修正する必要があります。

関連する問題