Hi,

I want to use osgPPU::UnitTexture to shoot a video as a texture input for
another unit.

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



But this doesnt work, the texture input in my other module is always black.

Is my code wrong ? If no, what is the way to do that with osgPPU

Is this the good place to post for osgPPU ?

Thank you

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

Reply via email to