Hi.
First : Many thanks for this great python bindings !!

I'm trying to thread my opengl class but it is not working. I get segmentation fault at glutInit or glutInitDisplayMode

here is the simplest example I was able to build. It never gets to the : print "end" part.... It seg fault before.

#########################
# code begins here
#########################
from OpenGL.GLUT import *
from threading import *
import time


class GlObject(Thread):
   
    def __init__(self):
        Thread.__init__(self)
       
    def run(self):
        print "glutInit"
        glutInit(sys.argv)
        print "initDisplay"
        glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH )
        print "end" # never reach that part...
       
       
glObject = GlObject()
print "starting object"
glObject.start()


while True:
    print "waiting"
    time.sleep(1)
##########################

Can any body tell me what I am doing wrong. Is there a way around this ?

I need to get the opengl stuff in a different thread. In my program it is only a eye candy that print out the state of my algorithm that need to be running all the time...

please help

thanks all ;)

ªŁ€×