Show
Ignore:
Timestamp:
01/16/08 16:07:40 (1 year ago)
Author:
cneumann
Message:

changed: - factory functions return a TransitPtr? that can not be implicitly

converted to C Ptr. Should help with porting.

added: - GlobalRefPtr?, needed for cases where upon return from main

a RefPtr? goes out of scope (it would attempt to access the
FCFactory which is already shutdown at that point).

status: - vrml loader does not compile (needs porting to ref ptr)

  • tutorials compile, run and exit cleanly
  • multithreading and cluster are untested, yet
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Tutorials/01hello.cpp

    r1035 r1039  
    3939int main(int argc, char **argv) 
    4040{ 
     41    std::cerr << "-- BEGIN main --" << std::endl; 
     42 
    4143    // OSG init 
    4244    osgInit(argc,argv); 
     
    4648 
    4749    // the connection between GLUT and OpenSG 
    48     GLUTWindowRefPtr gwin = GLUTWindow::create(); 
     50    GLUTWindowGlobalRefPtr gwin = GLUTWindow::create(); 
    4951    gwin->setGlutId(winid); 
    5052    gwin->init(); 
    5153 
    5254    // create the scene 
    53     NodeRefPtr scene = makeTorus(.5, 2, 16, 16); 
     55    NodeGlobalRefPtr scene = makeTorus(.5, 2, 16, 16); 
    5456 
    5557    commitChanges(); 
     
    6769    // GLUT main loop 
    6870    glutMainLoop(); 
    69  
     71     
     72    std::cerr << "-- END   main --" << std::endl; 
     73     
    7074    return 0; 
    7175} 
     
    7983{ 
    8084    std::cerr << "-- BEGIN Frame --" << std::endl; 
    81  
     85     
    8286    mgr->redraw(); 
    8387     
     
    117121        case 27:         
    118122        { 
     123            delete mgr; 
     124         
    119125            OSG::osgExit(); 
    120126            exit(0);