Hi Josh,
On Sat, Aug 20, 2011 at 3:04 PM, Josh Jung <[email protected]> wrote:
> Hi,
>
> I have been looking through many forums about having a video on OSG so i
> can use that as Augmented Reality Marker.
>
> ive dowloaded Quicktime DSK, C Maker, OSGART....
> they are too much to understand what i should do.
>
> Anyone can help me here step by step what i need to do?
>
> ...
>
> Thank you!
>
> Cheers,
> Josh
>
>
OSG has some plugins to read movies. You'll need to build osg with at least
one of them. I'd suggest the ffmpeg plugin.
Then you can have a look at osgmovie example.
Basically, a movie is read into an osg::ImageStream object which inherits
from osg::Image. So you can use to texture an object as a regular image.
osg::ref_ptr<osg::Image> movie =
osgDB::readImageFile("your_movie.avi.ffmpeg");
osg::ImageStream* is = dynamic_cast<osg::ImageStream*>(movie.get());
if (is) is->play(); // this will trigger the video
Cheers,
Mourad
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org