Show
Ignore:
Timestamp:
09/25/07 19:01:16 (7 years ago)
Author:
robert
Message:

Added --flip option to allow one to flip the source data about the x axis.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgmovie/osgmovie.cpp

    r7477 r7479  
    268268 
    269269 
    270 osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,float height, osg::Image* image, bool useTextureRectangle, bool xyPlane) 
     270osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,float height, osg::Image* image, bool useTextureRectangle, bool xyPlane, bool option_flip) 
    271271{ 
    272272    bool flip = image->getOrigin()==osg::Image::TOP_LEFT; 
     273    if (option_flip) flip = !flip; 
     274     
    273275    if (useTextureRectangle) 
    274276    { 
     
    348350 
    349351    bool fullscreen = !arguments.read("--interactive"); 
    350  
     352    bool flip = arguments.read("--flip"); 
    351353 
    352354    osg::ref_ptr<osg::Geode> geode = new osg::Geode; 
     
    409411            if (image) 
    410412            { 
    411                 geode->addDrawable(myCreateTexturedQuadGeometry(pos,image->s(),image->t(),image, useTextureRectangle, xyPlane)); 
     413                geode->addDrawable(myCreateTexturedQuadGeometry(pos,image->s(),image->t(),image, useTextureRectangle, xyPlane, flip)); 
    412414         
    413415                bottomright = pos + osg::Vec3(static_cast<float>(image->s()),static_cast<float>(image->t()),0.0f);