Changeset 60


Ignore:
Timestamp:
Dec 14, 2004, 5:34:50 PM (20 years ago)
Author:
darran
Message:
  • wireframe not working with displaylist(true), fix it
  • should use alphafunc to cull alpha=0 triangles, this will hopefully stop z fighting
Location:
Swollen
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Swollen/doc/contract2_priorities.txt

    r50 r60  
    5050- steepcull dataset reveals steep angle cull problem
    5151- dragging sww onto swollen (all in one directory) does not produce the same results as calling from command line
    52 - Problems with Duncan's, Chris' and Stephen Roberts' machines at GA: Swollen won't render semi transparency. Swwviewer works fine. (This appeared to work on Dunca's computer 13/12/4?).
     52- Problems with Duncan's, Chris' and Stephen Roberts' machines at GA: Swollen won't render semi transparency.
     53  Swwviewer works fine. (This appeared to work on Dunca's computer 13/12/4?).
     54- toggle wireframe not working on Mac
    5355
    5456
     
    9092- Concept of 'buildings' and shaking them [0]
    9193- Interactive positioning of light(s) [0]
    92 
    93 
    9494- user feedback should differentiate between "sww file not found" and
    9595  "sww file couldn't read" [1]
  • Swollen/swollen/main.cpp

    r53 r60  
    167167    viewer.getTrackball()->setAutoComputeHomePosition( false );
    168168    viewer.getTrackball()->setHomePosition(
    169         osg::Vec3d(0,-3,2),    // camera location
     169        osg::Vec3d(0,-3,0),    // camera location
    170170        osg::Vec3d(0,0,0),     // camera target
    171171        osg::Vec3d(0,0,1) );   // camera up vector
  • Swollen/swollen/watersurface.cpp

    r54 r60  
    3636    _node->setStateSet(_stateset);
    3737
    38     _geom->setUseDisplayList(true);
     38    // FIXME: if set to true, wireframe doesn't work - need to dirty to force update?
     39    _geom->setUseDisplayList( false );
    3940
    4041    // initial geometry
  • Swollen/swwreader/swwreader.cpp

    r59 r60  
    284284
    285285    // stage height above bedslope mapped as alpha value
    286     //
    287     // Transparancy alpha is calculated as
    288     //
    289     // alpha = min( a(h-hmin) + alphamin, alphamax),  h >= hmin
    290     // alpha = 0,                                     h < hmin
    291     //
     286    //      alpha = min( a(h-hmin) + alphamin, alphamax),  h >= hmin
     287    //      alpha = 0,                                     h < hmin
    292288    // where a = (alphamax-alphamin)/(hmax-hmin)
    293    
    294     float alpha, height, _alphascale;
    295     _alphascale = (_alphamax - _alphamin) / (_heightmax - _heightmin);
     289    float alpha, height, alphascale;
     290    alphascale = (_alphamax - _alphamin) / (_heightmax - _heightmin);
    296291    _stagecolors = new osg::Vec4Array;
    297292    for (iv=0; iv < _npoints; iv++)
     
    302297          alpha = 0.0;
    303298        } else {
    304           alpha = _alphascale*(height - _heightmin) + _alphamin;
     299          alpha = alphascale*(height - _heightmin) + _alphamin;
    305300          if( alpha > _alphamax ) alpha = _alphamax;     
    306301        }
Note: See TracChangeset for help on using the changeset viewer.