On 7/6/07, Paul Martz <[EMAIL PROTECTED]> wrote:
Good point, and thanks for bringing that up again. That might help the
original poster.
However, I'd think that what he's trying to do should work without placing
his OpenGL code in a Camera callback. If I remember correctly, your issue
was caused by the lack of a current rendering context, problem introduced by
using osgViewer. This guy is using SceneView, so he has control over the
context and (presumably) has it current when he's issuing OpenGL commands.
Without spending a good bit of time reflecting on this issue I can't
suggest a clean solution, however, I do understand how this issue is
one of the prickler topics that some users come across - embedded the
OSG into existing OpenGL rendering code is not straight forward.
What I can say is that I'm open to integrating some form of solution
into osgViewer and a varient on theme started with
GraphicsWindowEmbedded. It don't know what the solution might look
like, perhaps a subclassing from Viewer and overridding the
renderingTraversals() method to do work to dirty/reset osg::State and
push/pop OpenGL state.
This is the direction I'd like to go in, while its not a common usage
model, it would be great to be able to support it easily, and just
have to point to an example showing how to do rather than go through
lots of emails discussing the topic. There is a big but... I'm busy
with others tasks so can't go wandering off on such errands. Perhaps
members of the community have investigate this route.
Robert.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/