33#ifdef G4VIS_BUILD_OPENGL_DRIVER
35#ifndef G4OPENGLVIEWER_HH
36#define G4OPENGLVIEWER_HH
41class G4OpenGLSceneHandler;
46class G4OpenGLViewer:
virtual public G4VViewer {
48 friend class G4OpenGLSceneHandler;
49 friend class G4OpenGLImmediateSceneHandler;
50 friend class G4OpenGLStoredSceneHandler;
51 friend class G4OpenGLFileSceneHandler;
60 G4OpenGLViewer (G4OpenGLSceneHandler& scene);
61 virtual ~G4OpenGLViewer ();
64 G4OpenGLViewer(
const G4OpenGLViewer&);
65 G4OpenGLViewer& operator= (
const G4OpenGLViewer&);
71 virtual void DrawText(
const G4Text&);
73 void ChangeLineWidth(
G4double width);
74 void HaloingFirstPass ();
75 void HaloingSecondPass ();
77 void HLRSecondPass ();
79 void InitializeGLView ();
81 void ResizeWindow(
unsigned int,
unsigned int);
82 void Pick(GLdouble x, GLdouble y);
83 virtual void CreateFontLists () {}
96 std::string getRealPrintFilename();
97 unsigned int getWinWidth();
98 unsigned int getWinHeight();
101 GLdouble getSceneNearWidth();
102 GLdouble getSceneFarWidth();
103 GLdouble getSceneDepth();
108 G4OpenGLSceneHandler& fOpenGLSceneHandler;
111 transparency_enabled,
112 antialiasing_enabled,
117 G4double fDisplayHeadTimeX, fDisplayHeadTimeY;
119 G4double fDisplayHeadTimeRed, fDisplayHeadTimeGreen, fDisplayHeadTimeBlue;
120 G4bool fDisplayLightFront;
121 G4double fDisplayLightFrontX, fDisplayLightFrontY, fDisplayLightFrontZ,
123 G4double fDisplayLightFrontRed, fDisplayLightFrontGreen, fDisplayLightFrontBlue;
130 static G4int fPrintSizeX;
131 static G4int fPrintSizeY;
133 static int fPrintFilenameIndex;
134 unsigned int fWinSize_x, fWinSize_y;
137 int fGl2psDefaultLineWith;
138 int fGl2psDefaultPointSize;
144 G4int getRealPrintSizeX();
145 G4int getRealPrintSizeY();
146 GLubyte* grabPixels (
int inColor,
148 unsigned int height);
149 bool printNonVectoredEPS ();
152 bool printVectoredEPS();
virtual void ClearView()=0