31 ClassImp(TGLPolyLine);
37 TGLPolyLine::TGLPolyLine(
const TBuffer3D & buffer) :
38 TGLLogicalShape(buffer),
39 fVertices(buffer.fPnts, buffer.fPnts + 3 * buffer.NbPnts()),
42 if (TAttLine *lineAtt = dynamic_cast<TAttLine *>(buffer.fID))
43 fLineWidth = lineAtt->GetLineWidth();
50 void TGLPolyLine::DirectDraw(TGLRnrCtx & rnrCtx)
const
53 Info(
"TGLPolyLine::DirectDraw",
"this %ld (class %s) LOD %d", (Long_t)
this, IsA()->GetName(), rnrCtx.ShapeLOD());
56 if (rnrCtx.DrawPass() == TGLRnrCtx::kPassOutlineLine)
59 Double_t oldWidth = 1.;
60 glGetDoublev(GL_LINE_WIDTH, &oldWidth);
62 TGLUtil::LineWidth(fLineWidth);
64 glBegin(GL_LINE_STRIP);
66 for (UInt_t i = 0; i < fVertices.size(); i += 3)
67 glVertex3d(fVertices[i], fVertices[i + 1], fVertices[i + 2]);
71 glLineWidth(oldWidth);