Hi Sherman,

Yes, this is not really how this was intended to be used and a complaint we've seen before.  I'll need to look into it for you.  There is something in Producer that does not allow reallocation of resources somehow, but I haven't gotten a handle on it.  I will be getting my hands deep into Producer over the next few months so the fixes should fall out for you.  Your influence on how this goes would be gladly accepted.

On the flip side, I've been able to  create and delete cameras, rendersurfaces, and other objects in producer at will before.  So, I'm not sure what the issue is here.  That message comes from some contributed code on the windows side that has not been explained to me well.


-don

On 10/18/06, sherman wilcox <[EMAIL PROTECTED]> wrote:
I'm using osgProducer::Viewer in a Win32 app and I'd like to re-use the viewer object if possible. I've got things setup so I can hit a key to construct a viewer with the proper scene graph and hit another key to kill the viewer. Problem is, when I go to build another viewer after I've already built the first one I get this error message in my output window:
 
"Producer::WGLExtensions: could not make the temporary window's context active"
 
My viewer construction/service code resides on a separate thread. The thread loop looks like this
 
void threadEntry()
{
 
 viewer->setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);
 viewer->setSceneData(loadRootNode());
 viewer->realize();
 
 while(run){
 viewer.sync();
 viewer.update();
 viewer.frame();
 }
 

viewer->sync();
viewer->cleanup_frame();
viewer->sync();

}

 

When this thread exits and viewer is deleted I get an exception:
First-chance exception at 0x7c812a5b in osgvislib_driver_console.exe: Microsoft C++ exception: Win32ThreadCanceled at memory location 0x0352f967

This exception is generated by OpenThreads.

 

I thinking that I'm either not cleaning up things properly or I'm trying to do something that shouldn't be tried.

Suggestions?

 
P.S.
I'm running XP Pro using Visual Studio 2005.

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


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

Reply via email to