OpenGL doesn't work in multithreaded prog, why?
I need to use ARToolkit combining with our university framework, that
controls a robot and it's a multithreaded platform.
I use ARToolkit to grab image by camera, and detect a fiducial
marker. I have a thread dedicated to ARToolkit and an object class
that implement the ARToolkit call function. I call once
glutDisplayFunc(drawInit); glutIdleFunc(Display) to display image in
the initialization. In my ARToolkit's thread I call once
glutMainLoop(), and I have the comunication throught two thread,
because I need to transmit the position of marker detected.
I have a problem with the update of the image, beacause cause a
problem with the control of manipulator by the other thread!!!! If I
remove the glut functions the system works and the marker is detected
and trasmited, but with glut the system don't work well. I don't have
find a solution yet.It would not be a problem on ARToolKit, but on OpenGL.
Usually OpenGL does not work in multithreaded program.
What I can do?
Re: OpenGL doesn't work in multithreaded prog, why