31 #define IMG(id) OLocalizator::getPicture("TYPanelGraphic", (id))
68 glGetIntegerv(GL_VIEWPORT, viewport);
69 unsigned int width = viewport[2];
70 unsigned int height = viewport[3];
72 GLdouble polygonMode[2];
73 glGetDoublev(GL_POLYGON_MODE, polygonMode);
76 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
79 glMatrixMode(GL_PROJECTION);
82 glOrtho(0, width, 0.0, height, 0.0, 1.0);
85 glMatrixMode(GL_MODELVIEW);
92 int x =
_posX + offset;
93 int y =
_posY - offset;
101 glVertex2i(x, y - dy);
102 glVertex2i(x + dx, y - dy);
103 glVertex2i(x + dx, y);
130 glMatrixMode(GL_PROJECTION);
134 glMatrixMode(GL_MODELVIEW);
138 glPolygonMode(GL_FRONT_AND_BACK, polygonMode[0]);
Representation graphique d'un panel d'informations (fichier header)
Contexte de rendu utilisé par les fonctions d'affichage.
static const OColor BLACK
static const OColor YELLOW
bool load(const char *filename)
void drawText(const std::string &msg, const OColor &color, double x, double y) const
classe graphique pour un element de base
bool _visible
Inique si l'element est visible.
virtual void update(bool force=false)
TYPanelGraphic(TYPanel *pElement)
virtual void update(bool force=false)
virtual ~TYPanelGraphic()
virtual void display(TYRenderContext &renderContext)
Classe de definition d'un panel d'information.