PDA

View Full Version : OpenGl and Thread



castagne
06-03-2003, 02:11 AM
Hi all,

After many trials, I still have problem concerning an implementation of OpenGL rendering wihin Threads.

I have two threads, each one in charge of drawing in a canvas.

Each thread creates its gl context with non-direct rendering, displays its canvas, and perfoms calls to GLXMakeCurrent and Swapbuffer on its canvas.

However, I still often get BadContextTag errors, and Xlib async errors on some machines and when using the X11 server (distant display).

Any idea, advice, etc ?
Is there a web site where I could get advices, peace of code, etc ?

Thx in advance !

nicolas

technical information :
program developped on SGI octane and o2
syst. IRIX 6.5
with the XForms toolkit

jide
06-04-2003, 04:18 AM
I think you may had more results in the linux forum...

You get many async problem, isn't it ?

Are you familiar with threads ? or is it your firsts try ? You need to synchronize all, read all the X and glx documenation. And then you'll be free to do what you want.

Anyway, you need to have your gl context valid each time you enter a new thead. So you must ensure that.

hope it helps

jide