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/04hiertransform.cpp

    r835 r1039  
    2222 
    2323// just use a single transformation that is shared 
    24 TransformPtr trans; 
     24TransformGlobalRefPtr trans; 
    2525 
    2626 
     
    5858 
    5959    // the connection between GLUT and OpenSG 
    60     GLUTWindowPtr gwin= GLUTWindow::create(); 
     60    GLUTWindowGlobalRefPtr gwin= GLUTWindow::create(); 
    6161    gwin->setGlutId(winid); 
    6262    gwin->init(); 
     
    8484      
    8585    // use a cylinder this time 
    86     GeometryPtr cyl = makeCylinderGeo( 1, .3, 8, true, true, true ); 
     86    GeometryGlobalRefPtr cyl = makeCylinderGeo( 1, .3, 8, true, true, true ); 
    8787     
    8888    // the single transformation Core used 
     
    9898       NullFC is the generic NULL value for FieldContainer pointer. 
    9999    */ 
    100     NodePtr last = NullFC
     100    NodeGlobalRefPtr last
    101101     
    102102    // create the copied transformations and their geometry nodes 
     
    104104    { 
    105105        // create the shared Geometry 
    106         NodePtr geonode = Node::create(); 
     106        NodeRefPtr geonode = Node::create(); 
    107107        geonode->setCore(cyl); 
    108108 
    109109        // add a transformation to the Geometry 
    110         NodePtr transnode = Node::create(); 
     110        NodeRefPtr transnode = Node::create(); 
    111111 
    112112        transnode->setCore (trans); 
     
    120120    } 
    121121  
    122     NodePtr scene = last; 
     122    NodeGlobalRefPtr scene = last; 
    123123 
    124124    commitChanges(); 
     
    176176        case 27:     
    177177        { 
     178            delete mgr; 
     179         
    178180            OSG::osgExit(); 
    179181            exit(0); 
     
    186188        } 
    187189        break; 
     190         
     191        case 'd': 
     192        { 
     193            trans.dump(); 
     194        } 
    188195    } 
    189196}