Hi Alexandre, > Hi, > > I want to use osgPPU::UnitTexture to shoot a video as a texture input for > another unit. > Ok, good idea, I have used it for my project successfully.
> So I tried this code : > > Image * myVideo = osgDB::readImageFile( "myVideoFile.mov" ); > > osg::ImageStream * videoStream_ = NULL; > videoStream_ = dynamic_cast<osg::ImageStream*>( myVideo ); > videoStream_->setLoopingMode( osg::ImageStream::LOOPING ); > > if( videoStream_ ) > videoStream_->play(); > > osg::Texture2D* texture = new osg::Texture2D(); > texture->setImage(myVideo); > > osgPPU::UnitTexture * videoUnitTexture = new osgPPU::UnitTexture( texture > ); > > .... and then plug it in the unit pipeline > How is the rest of your setup. It should be something like this: osgPPU::Processor->addChild(videoUnitTexture); videoUnitTexture->addChild(anotherUnit); > > > But this doesnt work, the texture input in my other module is always black. > I'll try tomorrow a simple example and let you know if you need some extra setup. There were a lot of changes since the last use of video processing through osgPPU. > Is my code wrong ? If no, what is the way to do that with osgPPU > Could you check if the video streaming do work at all? I mean it could be that the file is just not streamed properly. Try to set the texture to some model in the scene and see if the texture changes during the rendering. > Is this the good place to post for osgPPU ? > I think yes, if nobody complains ;). There is no extra mailinglist for osgPPU. Best regards, Art > Thank you > > Alexandre _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

