On 7/25/06, Stephan Huber <[EMAIL PROTECTED]> wrote:
Producer (and my viewer) uses for OS X two shared opengl-contexts, one
for the fullscreen mode and one for the windowed mode. So most states
are shared between the two contexts. But clientstates are not shared
between them. So they are enabled for one context and disabled for the
other context.

Pressing s or h seems to reset osg's state so the context knows about
the clientstates and the rendering is correct.

I fixed the problem in my code by creating a new state for the
sceneview, but I don't know what's the best solution for Producer.

With the OSG's design two graphics contexts should be served by two
osg::State objects.  The sticking point is that osgProducer doesn't
know about the fact that Producer is managing two graphics context
under the hood for a single RenderSurface.

Perhaps some OSX AGL/CGL specific code in osgProducer::OsgSceneHandler
could be introduced to get round this.  But how would it know to
switch between the two?  The other way might be to call _state.reset()
after the switch, but again how does osgProducer know about the
switch...

Perhaps we need an extra callback in Producer for informing about the
switch, or perhaps we need some methods for informing the world that
this is a tricked out RenderSurface with two contexts, and which one
is currently active.

Either way its pretty yucky.

Another alternative might be to abandon the whole AGL/CGL full screen
mode, as its a general pain in the butt.  Could maxining a borderless
window which hides the OSX menu bar be possible?

Oh how I wish Apple had just adopted X11 properly, AGL&CGL really is a
bit of pigs ear when it comes to real-time application needs.

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

Reply via email to