Hi All,
I have tried to play movie on created canvas by osgWidget::Box class by this
way;
/-----------------------------------------CodeSample---------------------------------------------/
osg::Image* image = osgDB::readImageFile("video.mov");
osg::ImageStream* imagestream = dynamic_cast<osg::ImageStream*>(image);
if (imagestream) imagestream->play();
osgWidget::Window* box1 = createBox("HBOX", osgWidget::Box::HORIZONTAL,
image);
box1->getBackground()->setColor(1.0f, 0.0f, 0.0f, 0.8f);
box1->attachMoveCallback();
wm->addChild(box1);
// pass the model to the MovieEventHandler so it can pick out
ImageStream's to manipulate.
MovieEventHandler* meh = new MovieEventHandler();
viewer.addEventHandler( meh );
viewer.setSceneData( wm->createParentOrthoCamera() );
viewer.run();
/-----------------------------------------CodeSample---------------------------------------------/
But I can't see the video frames on the box, the video is playing, I can
hear it voice and console information which is scaling the every frame to
the expected size notify. If I play the gif file on the box instead of
video, it plays the gif file without any error.
I have searched the source code and find that, osgWidget::Widget class's
setImage function using osg::Texture2D function to operate texturing. But in
the movie example I have created Quad with osg::TextureRectangle function to
operate texturing. And it works by using TextureRectange. If when I use
Texture2D the same problem has appeared as this.
Could it be drawback of osgWidget::Widget class setImage function in some
format texturing operation?
Is there anyone who try to play video on Box created by osgWidget?
Best Regards.
Ümit Uzun
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org