Hi Stephan,

On 2/16/07, Stephan Maximilian Huber <[EMAIL PROTECTED]> wrote:
after poking around a lot I finally did a clean checkout of the source
-- and voila: it works. Looks like my CraphicsWindowCarbon-header did
not get updated correctly, and so the part of the shared contextIds in
the constructor was not in place -- so context-sharing did not work. Now
everything is fine and happy, even multithreaded. Again, sorry for the
noise.

Horahh ;-)

I was wondering in my changes the header were wrong... but its not,
which is great relief.


But one small problem is still there:

I added a glFlush before the copyTexture-call in renderStage.cpp for
debugging purposes. Here are my observations:

without glFlush the rtt-window is white, but the texture gets updated
with the framebuffer, but: the rotation of the cow is choppy (the
animation of the flag is fine and smooth) it looks like an internal
synchronization issue. If I add the glFlush-call again both animations
are smooth.

I think what is probably happening is that the RTT windows FIFO is
filled up, then the main window's OpenGL FIFO is filled.  Two FIFO's
are being served by the graphics driver in a parallel, and if the RTT
FIFO finishes after the main FIFO's gets to render the texture then
it'll have the won't have the latest contexts.

The ideal way to syncronize the two threads would be to have the draw
dispatch for the main window halt on completion of RTT FIFO's copy
texture.  However, adding such syncronization code will be really
hard, especially without good OpenGL support for syncronization -
these extensions are still in the pipeline though...

So the upshot of all this is the glFlush after the copy texture call
is the way to go right now so I'll add this.  Could you send my your
modified file so I can double check what changes I make against what
works for you.

I'll wait to check any changes in though as I've just packaged up
OpenThreads and OpenSceneGraph CVS repositories ready to be imported
into subversion on the new server.

Robert.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to