Show
Ignore:
Timestamp:
04/26/07 18:50:35 (7 years ago)
Author:
robert
Message:

Added using of VertexBufferObject? and ElementsBufferObject? classes

Files:
1 modified

Legend:

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

    r6554 r6560  
    221221    geom->setVertexArray(vertices); 
    222222 
     223    osg::VertexBufferObject* vbObject = new osg::VertexBufferObject; 
     224    vertices->setVertexBufferObject(vbObject); 
     225     
     226    osg::ElementsBufferObject* ebo = new osg::ElementsBufferObject; 
     227 
    223228    for(iy=0; iy<num_y-1; ++iy) 
    224229    { 
     
    231236            (*elements)[element_no++] = index++; 
    232237        } 
    233         geom->addPrimitiveSet(elements);     
     238        geom->addPrimitiveSet(elements);  
     239         
     240        if (ebo) elements->setElementsBufferObject(ebo);    
    234241    } 
    235242