Finally I found it working, when manually assigning the context:

Code:
        framecnt_++;
        if (framecnt_ == 2) {
                // osgCompute
                setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);
                setReleaseContextAtEndOfFrameHint(false);

                osgViewer::ViewerBase::Contexts ctxs;
                getContexts(ctxs, true);
                osgCompute::GLMemory::bindToContext(*ctxs[0]);

                osg::ref_ptr<osgCompute::Computation> computation = 
dacGPU::setupComputation();

                osg::ref_ptr<osgCompute::Module> module = 
computation->getModule( "osgcuda_warp" );
                if( !module )
                {
                        osg::notify(osg::FATAL) << "Cannot find module 
identified by osgcuda_warp." << std::endl;
                        return;
                }
                module->setUserData( getFrameStamp() );

                // Add computation to scene
                getManager()->getGeometryRoot()->addChild(computation);
        }



Best regards,

Johannes

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41588#41588





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to