osg::Node* createLineDrawables() { LineGroup* group = new LineGroup(); group->addCullCallback(new InstallViewportSizeUniform()); float x = 10; LineDrawable* strip = new LineDrawable(GL_LINE_STRIP); strip->setLineWidth(8); strip->setColor(osg::Vec4(1,1,1,1)); addVerts(strip, x, 10); group->addChild(strip); x += 20; LineDrawable* loop = new LineDrawable(GL_LINE_LOOP); loop->setLineWidth(8); loop->setColor(osg::Vec4(1,1,0,1)); addVerts(loop, x, 10); group->addChild(loop); x += 20; LineDrawable* stippled = new LineDrawable(GL_LINE_STRIP); stippled->setLineWidth(4); stippled->setStipplePattern(0xff00); stippled->setColor(osg::Vec4(0,1,0,1)); addVerts(stippled, x, 10); group->addChild(stippled); x += 20; LineDrawable* segments = new LineDrawable(GL_LINES); segments->setLineWidth(3); segments->setColor(osg::Vec4(0,1,1,1)); addVerts(segments, x, 10); group->addChild(segments); x += 20; LineDrawable* firstCount = new LineDrawable(GL_LINE_STRIP); firstCount->setLineWidth(5); firstCount->setColor(osg::Vec4(1,0,1,1)); addVerts(firstCount, x, 10); firstCount->addUpdateCallback(new TestFirstCount()); group->addChild(firstCount); x += 20; osg::ref_ptr<osg::Node> node = makeGeometryForImport(x, 10); group->import(node.get()); return group; }