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?

See Parallel OpenGL FAQ. Also see GDC2005_OpenGL_Performance.pdf pages 33-37.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.