Show
Ignore:
Timestamp:
10/21/14 17:10:27 (4 days ago)
Author:
robert
Message:

Added shaders to support experimental shader based displacement mapping technique osgTerrain::ShaderTerrain?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgphotoalbum/ImageReaderWriter.cpp

    r13449 r13576  
    3434    _maximumWidth(1.25f,0.0f,0.0f), 
    3535    _maximumHeight(0.0f,0.0f,1.0f), 
    36     _numPointsAcross(10),  
     36    _numPointsAcross(10), 
    3737    _numPointsUp(10), 
    3838    _backPage(false) {} 
     
    4545    _maximumWidth(width,0.0f,0.0f), 
    4646    _maximumHeight(0.0f,0.0f,height), 
    47     _numPointsAcross(10),  
     47    _numPointsAcross(10), 
    4848    _numPointsUp(10), 
    4949    _backPage(backPage) {} 
     
    5656    _maximumWidth(rhs._maximumWidth), 
    5757    _maximumHeight(rhs._maximumHeight), 
    58     _numPointsAcross(rhs._numPointsAcross),  
     58    _numPointsAcross(rhs._numPointsAcross), 
    5959    _numPointsUp(rhs._numPointsUp), 
    6060    _backPage(rhs._backPage) {} 
     
    122122    osg::Image* image = 0; 
    123123    float s=1.0f,t=1.0f; 
    124      
     124 
    125125    // try to load photo from any loaded PhotoArchives 
    126126    if (!_photoArchiveList.empty()) 
    127127        image = readImage_Archive(dr,s,t); 
    128          
     128 
    129129    // not loaded yet, so try to load it directly. 
    130130    if (!image) 
     
    211211        osg::Vec4Array* colours = new osg::Vec4Array(1); 
    212212        (*colours)[0].set(1.0f,1.0f,1.0,1.0f); 
    213         geom->setColorArray(colours); 
    214         geom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     213        geom->setColorArray(colours, osg::Array::BIND_OVERALL); 
    215214 
    216215        geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4));