From c2432b22da7cf460e22587780e5b0e0bebb093c5 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 21 Jul 2008 09:55:15 +0000 Subject: [PATCH] Added first cut of ImageStream IO wrapper --- src/osgPlugins/osg/CMakeLists.txt | 1 + src/osgPlugins/osg/ImageSequence.cpp | 45 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/osgPlugins/osg/ImageSequence.cpp diff --git a/src/osgPlugins/osg/CMakeLists.txt b/src/osgPlugins/osg/CMakeLists.txt index 778aa88e6..3428fae72 100644 --- a/src/osgPlugins/osg/CMakeLists.txt +++ b/src/osgPlugins/osg/CMakeLists.txt @@ -29,6 +29,7 @@ Geode.cpp Geometry.cpp Group.cpp Image.cpp +ImageSequence.cpp LOD.cpp Light.cpp LightModel.cpp diff --git a/src/osgPlugins/osg/ImageSequence.cpp b/src/osgPlugins/osg/ImageSequence.cpp new file mode 100644 index 000000000..0c36a3fa8 --- /dev/null +++ b/src/osgPlugins/osg/ImageSequence.cpp @@ -0,0 +1,45 @@ +#include "osg/ImageSequence" + +#include "osgDB/Registry" +#include "osgDB/Input" +#include "osgDB/Output" + +using namespace osg; +using namespace osgDB; + +// forward declare functions to use later. +bool ImageSequence_readLocalData(Object& obj, Input& fr); +bool ImageSequence_writeLocalData(const Object& obj, Output& fw); + +// register the read and write functions with the osgDB::Registry. +RegisterDotOsgWrapperProxy g_ImageSequenceProxy +( + new osg::ImageSequence, + "ImageSequence", + "Object ImageSequence", + &ImageSequence_readLocalData, + &ImageSequence_writeLocalData +); + +bool ImageSequence_readLocalData(Object& /*obj*/, Input& /*fr*/) +{ + bool iteratorAdvanced = false; + + // Image& image = static_cast(obj); + + // no current image reading code + // as it is all handled by osg::Registry::readImage() via plugins. + + return iteratorAdvanced; +} + + +bool ImageSequence_writeLocalData(const Object& /*obj*/, Output& /*fw*/) +{ + // const ImageSequence& image = static_cast(obj); + + // no current image writing code here + // as it is all handled by osg::Registry::writeImage() via plugins. + + return true; +}