61 Int_t fm = fM->GetFontMode();
62 if (fm == TGLFont::kBitmap || fm == TGLFont::kPixmap || fm == TGLFont::kTexture)
63 rnrCtx.RegisterFont(fM->GetFontSize(), fM->GetFontFile(), fM->GetFontMode(), fFont);
65 rnrCtx.RegisterFontNoScale(fM->GetFontSize(), fM->GetFontFile(), fM->GetFontMode(), fFont);
70 fFont.PreRender(fM->GetAutoLighting(), fM->GetLighting());
73 const GLdouble *pm = rnrCtx.RefCamera().RefLastNoPickProjM().CArr();
77 glGetDoublev(GL_MODELVIEW_MATRIX, mm);
78 glGetIntegerv(GL_VIEWPORT, vp);
80 fX[0][0] = fX[0][1] = fX[0][2] = 0;
82 gluProject(fX[0][0], fX[0][1], fX[0][2], mm, pm, vp, &x, &y, &z);
84 fFont.BBox(fM->GetText(), bbox[0], bbox[1], bbox[2],
85 bbox[3], bbox[4], bbox[5]);
88 gluUnProject(x + bbox[0], y + bbox[1], z, mm, pm, vp, &fX[0][0], &fX[0][1], &fX[0][2]);
89 gluUnProject(x + bbox[3], y + bbox[1], z, mm, pm, vp, &fX[1][0], &fX[1][1], &fX[1][2]);
90 gluUnProject(x + bbox[3], y + bbox[4], z, mm, pm, vp, &fX[2][0], &fX[2][1], &fX[2][2]);
91 gluUnProject(x + bbox[0], y + bbox[4], z, mm, pm, vp, &fX[3][0], &fX[3][1], &fX[3][2]);
92 glEnable(GL_POLYGON_OFFSET_FILL);
102 if (rnrCtx.ColorSet().Background().GetRed())
103 TGLUtil::Color(kWhite);
105 TGLUtil::Color(kBlack);
107 glPolygonOffset(1,1 );
116 TGLUtil::Color(fM->GetMainColor());
118 glPolygonOffset(0, 0 );
119 glBegin(GL_LINE_LOOP);
127 glPolygonOffset(0, 0 );
129 glRasterPos3i(0, 0, 0);
130 fFont.Render(fM->GetText());