55 Int_t fm = fM->GetFontMode();
56 if (fm == TGLFont::kBitmap || fm == TGLFont::kPixmap || fm == TGLFont::kTexture)
57 rnrCtx.RegisterFont(fM->GetFontSize(), fM->GetFontFile(), fM->GetFontMode(), fFont);
59 rnrCtx.RegisterFontNoScale(fM->GetFontSize(), fM->GetFontFile(), fM->GetFontMode(), fFont);
63 fFont.PreRender(fM->GetAutoLighting(), fM->GetLighting());
65 const GLdouble* pm = rnrCtx.RefCamera().RefLastNoPickProjM().CArr();
69 glGetDoublev(GL_MODELVIEW_MATRIX, mm);
70 glGetIntegerv(GL_VIEWPORT, vp);
72 fX[0][0] = fX[0][1] = fX[0][2] = 0;
74 gluProject(fX[0][0], fX[0][1], fX[0][2], mm, pm, vp, &x, &y, &z);
76 fFont.BBox(fM->GetText(), bbox[0], bbox[1], bbox[2], bbox[3], bbox[4], bbox[5]);
78 gluUnProject(x + bbox[0], y + bbox[1], z, mm, pm, vp, &fX[0][0], &fX[0][1], &fX[0][2]);
79 gluUnProject(x + bbox[3], y + bbox[1], z, mm, pm, vp, &fX[1][0], &fX[1][1], &fX[1][2]);
80 gluUnProject(x + bbox[3], y + bbox[4], z, mm, pm, vp, &fX[2][0], &fX[2][1], &fX[2][2]);
81 gluUnProject(x + bbox[0], y + bbox[4], z, mm, pm, vp, &fX[3][0], &fX[3][1], &fX[3][2]);
82 glEnable(GL_POLYGON_OFFSET_FILL);
91 if (rnrCtx.ColorSet().Background().GetRed())
92 TGLUtil::Color(kWhite);
94 TGLUtil::Color(kBlack);
96 glPolygonOffset(1, 1);
105 TGLUtil::Color(fM->GetMainColor());
107 glPolygonOffset(0, 0);
108 glBegin(GL_LINE_LOOP);
116 glPolygonOffset(0, 0);
118 glRasterPos3i(0, 0, 0);
119 fFont.Render(fM->GetText());