- Timestamp:
- 10/01/09 22:19:42 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgparametric/osgparametric.cpp
r6941 r10600 107 107 }; 108 108 109 osg::Node* createModel(const std::string& shader, const std::string& textureFileName, const std::string& terrainFileName, bool dynamic, bool vbo)109 osg::Node* createModel(const std::string& shader, const std::string& textureFileName, const std::string& terrainFileName, bool dynamic, bool useVBO) 110 110 { 111 111 osg::Geode* geode = new osg::Geode; … … 239 239 geom->setVertexArray(vertices); 240 240 241 osg::VertexBufferObject* vb Object = new osg::VertexBufferObject;242 vertices->setVertexBufferObject(vbObject);243 244 osg::ElementBufferObject* ebo = new osg::ElementBufferObject;241 osg::VertexBufferObject* vbo = useVBO ? new osg::VertexBufferObject : 0; 242 if (vbo) vertices->setVertexBufferObject(vbo); 243 244 osg::ElementBufferObject* ebo = useVBO ? new osg::ElementBufferObject : 0; 245 245 246 246 for(iy=0; iy<num_y-1; ++iy) … … 256 256 geom->addPrimitiveSet(elements); 257 257 258 if (ebo) elements->setElementBufferObject(ebo); 258 if (ebo) elements->setElementBufferObject(ebo); 259 259 } 260 260
