diff --git a/examples/osgmovie/ImageStream.h b/examples/osgmovie/ImageStream.h deleted file mode 100644 index 9e56ca3e1..000000000 --- a/examples/osgmovie/ImageStream.h +++ /dev/null @@ -1,72 +0,0 @@ -// -*-c++-*- - -/* - * Copyright (C) 2001 Ulrich Hertlein - * - * The Open Scene Graph (OSG) is a cross platform C++/OpenGL library for - * real-time rendering of large 3D photo-realistic models. - * The OSG homepage is http://www.openscenegraph.org/ - * - * This software is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef _IMAGESTREAM_H_ -#define _IMAGESTREAM_H_ - -#include -#include - -namespace osg { - - /** - * Image Stream class. - */ - class SG_EXPORT ImageStream : public Image - { - public: - ImageStream() { - _texMat = new TexMat; - _texMat->ref(); - } - - virtual Object* clone() const { return new ImageStream; } - virtual bool isSameKindAs(const Object* obj) const { - return dynamic_cast(obj) != NULL; - } - virtual const char* className() const { return "ImageStream"; } - - /// Return suitable texture matrix. - inline const TexMat* getTexMat() const { return _texMat; } - - /// Start or continue MPEG stream. - virtual inline void start() {} - - /// Stop MPEG stream. - virtual inline void stop() {} - - /// Rewind MPEG stream. - virtual inline void rewind() {} - - protected: - virtual ~ImageStream() { - _texMat->unref(); - } - - TexMat* _texMat; - }; - -} // namespace - -#endif diff --git a/examples/osgmovie/MpegImageStream.cpp b/examples/osgmovie/MpegImageStream.cpp index e6ea470fb..8428243bc 100644 --- a/examples/osgmovie/MpegImageStream.cpp +++ b/examples/osgmovie/MpegImageStream.cpp @@ -176,7 +176,7 @@ void MpegImageStream::load(const char* fileName) _rows = (unsigned char**) ::malloc(t * sizeof(unsigned char*)); unsigned char* dp = data; for (int i = 0; i < t; i++) { - _rows[i] = dp; + _rows[t-i-1] = dp; dp += (s * 3); } diff --git a/examples/osgmovie/osgmovie.cpp b/examples/osgmovie/osgmovie.cpp index 5545e0699..4452f9e09 100644 --- a/examples/osgmovie/osgmovie.cpp +++ b/examples/osgmovie/osgmovie.cpp @@ -118,7 +118,7 @@ int main(int argc, char** argv) } osg::TexMat* texMat = new osg::TexMat; - texMat->setMatrix(osg::Matrix::scale(mpeg->s(),-mpeg->t(),1.0f)*osg::Matrix::translate(0.0f,mpeg->t(),0.0f)); + texMat->setMatrix(osg::Matrix::scale(mpeg->s(),mpeg->t(),1.0f)); // Create morphed geometry