Commits

Anonymous committed b005140 Draft

Added --fps support

Comments (0)

Files changed (1)

examples/osgimagesequence/osgimagesequence.cpp

     double length = -1.0;
     while (arguments.read("--length",length)) {}
     
+    double fps = 30.0;
+    while (arguments.read("--fps",fps)) {}
+
     if (arguments.argc()>1)
     {
         for(int i=1; i<arguments.argc(); ++i)
                 imageSequence->addImageFile(arguments[i]);
             }
         }
+
         
         if (length>0.0)
         {
             unsigned int maxNum = osg::maximum(imageSequence->getFileNames().size(),
                                                imageSequence->getImages().size());
                                                
-            imageSequence->setLength(float(maxNum)*0.1f);
+            imageSequence->setLength(double(maxNum)*(1.0/fps));
         }
     }
     else