3 #include "FrameBoxGL.h"
4 #include <Reve/FrameBox.h>
6 #include <TGLDrawFlags.h>
9 #include "Windows4root.h"
16 //______________________________________________________________________
19 // A class encapsulating GL rendering of Reve::FrameBox via a static
24 void FrameBoxGL::Render(const FrameBox* box)
27 glGetBooleanv(GL_LIGHTING, &lightp);
28 if (lightp) glDisable(GL_LIGHTING);
30 const FrameBox& b = *box;
31 const Float_t* p = b.fFramePoints;
32 glColor4ubv(b.fFrameRGBA);
33 if (b.fFrameType == FrameBox::FT_Quad)
35 glBegin(GL_LINE_LOOP);
36 glVertex3fv(p); glVertex3fv(p + 3);
37 glVertex3fv(p + 6); glVertex3fv(p + 9);
40 else if (b.fFrameType == FrameBox::FT_Box)
42 glBegin(GL_LINE_STRIP);
43 glVertex3fv(p); glVertex3fv(p + 3);
44 glVertex3fv(p + 6); glVertex3fv(p + 9);
46 glVertex3fv(p + 12); glVertex3fv(p + 15);
47 glVertex3fv(p + 18); glVertex3fv(p + 21);
51 glVertex3fv(p + 3); glVertex3fv(p + 15);
52 glVertex3fv(p + 6); glVertex3fv(p + 18);
53 glVertex3fv(p + 9); glVertex3fv(p + 21);
57 if (lightp) glEnable(GL_LIGHTING);