Show
Ignore:
Timestamp:
03/04/09 14:24:36 (5 years ago)
Author:
robert
Message:

Added handling of ImageStream? Origin to make sure the movie always appears the correct way up.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgDB/ReadFile.cpp

    r9038 r9858  
    159159        if (imageStream.valid()) 
    160160        { 
     161            bool flip = image->getOrigin()==osg::Image::TOP_LEFT; 
     162 
    161163            // start the stream playing. 
    162164            imageStream->play(); 
     
    170172                                                   osg::Vec3(image->s(),0.0f,0.0f), 
    171173                                                   osg::Vec3(0.0f,0.0f,image->t()), 
    172                                                    0.0f,image->t(), image->s(),0.0f); 
     174                                                   0.0f, flip ? image->t() : 0.0, image->s(), flip ? 0.0 : image->t()); 
    173175 
    174176                pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0, 
     
    181183                                                   osg::Vec3(image->s(),0.0f,0.0f), 
    182184                                                   osg::Vec3(0.0f,0.0f,image->t()), 
    183                                                    0.0f,0.0f, 1.0f,1.0f); 
     185                                                   0.0f, flip ? 1.0f : 0.0f , 1.0f, flip ? 0.0f : 1.0f); 
    184186 
    185187                pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,