Hi Stephan,

On 1/7/07, Stephan Huber <[EMAIL PROTECTED]> wrote:
I have to notify the gl-context, that the window-geometry has changed:

    makeCurrent();
    aglUpdateContext(_context);

Without that calls some parts of the window get filled with garbage. I
can add the call to the part of the code which handles interactive
window-resizing, but I think it would be more robust to handle this via
a resizeImplementation, so when the user changes the window-geometry the
context gets updated accordingly.

Thanks for explanation.  A makeCurrent() would take the graphics
context and keep it, so any other thread that had it would loose it,
and since osgViewer::Viewer is designed to be multi-threaded this is
real problem.

Perhaps the aglUpdateContext could be called at the beginning of the
next frame.  We'd need to add some form of mechanism into
GraphicsContext/Viewer to do this.  We'll probably need to add a
virtual updateContext() method into GraphicsContext that would be a
non op on most platforms, but under AGL/CGL would do the
aglUIpdateContext.  We'd need to have a flag into GraphicsContext too
to say that updateContext() needs to be called on next frame.

Ack messy, but doable.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to