Show
Ignore:
Timestamp:
01/10/07 14:52:22 (7 years ago)
Author:
robert
Message:

Ported following examples to osgViewer:

osgparticleeffects
osgphotoalbum
osgpick
osgpoints
osgpointsprite
osgprecipitation
osgprerender
osgprerendercubemap
osgreflect
osgscalarbar
osgscribe
osgsequence
osgplanets

Files:
1 modified

Legend:

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

    r5381 r5954  
    66#include <osg/Texture2D> 
    77#include <osg/TexEnv> 
    8 #include <osgDB/ReadFile> 
    9 #include <osgProducer/Viewer> 
    108#include <osg/GLExtensions> 
    119#include <osg/TexEnv> 
     10 
     11#include <osgDB/ReadFile> 
     12 
     13#include <osgViewer/Viewer> 
    1214 
    1315osg::Geode *makeGalaxy(unsigned nvertices) 
     
    7678int main(int, char *[]) 
    7779{ 
    78     osgProducer::Viewer viewer; 
     80    osgViewer::Viewer viewer; 
    7981 
    8082    /// Make the galaxy of points 
     
    8385    node->setStateSet(makeStateSet(10.0f)); 
    8486 
    85     viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); 
    8687    viewer.setSceneData(node); 
    8788 
    88     viewer.realize(); 
    89     while (!viewer.done()) 
    90     { 
    91         viewer.sync(); 
    92         viewer.update(); 
    93         viewer.frame(); 
    94     } 
    95  
    96     // wait for all cull and draw threads to complete. 
    97     viewer.sync(); 
    98  
    99     // run a clean up frame to delete all OpenGL objects. 
    100     viewer.cleanup_frame(); 
    101  
    102     // wait for all the clean up frame to complete. 
    103     viewer.sync(); 
    104  
    105     return(0); 
     89    return viewer.run(); 
    10690} 
    10791