34 #ifdef G4VIS_BUILD_OPENGLX_DRIVER
42 G4OpenGLStoredXViewer::
43 G4OpenGLStoredXViewer (G4OpenGLStoredSceneHandler& sceneHandler,
45 :
G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name),
46 G4OpenGLViewer (sceneHandler),
47 G4OpenGLXViewer (sceneHandler),
48 G4OpenGLStoredViewer (sceneHandler)
50 if (fViewId < 0)
return;
54 G4cerr <<
"G4OpenGLStoredXViewer::G4OpenGLStoredXViewer -"
55 " G4OpenGLXViewer couldn't get a visual." <<
G4endl;
60 G4OpenGLStoredXViewer::~G4OpenGLStoredXViewer () {}
62 void G4OpenGLStoredXViewer::Initialise () {
64 #ifdef G4DEBUG_VIS_OGL
65 printf(
"G4OpenGLStoredXViewer::Initialise\n");
67 CreateGLXContext (vi_stored);
73 glDrawBuffer (GL_BACK);
76 void G4OpenGLStoredXViewer::DrawView () {
78 #ifdef G4DEBUG_VIS_OGL
79 printf(
"G4OpenGLStoredXViewer::DrawView\n");
88 if (!fNeedKernelVisit) KernelVisitDecision ();
89 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
96 #ifdef G4DEBUG_VIS_OGL
97 printf(
"G4OpenGLStoredXViewer::DrawView flush \n");
101 HaloingSecondPass ();
107 if (!kernelVisitWasNeeded) {
108 #ifdef G4DEBUG_VIS_OGL
109 printf(
"G4OpenGLStoredXViewer::DrawView NO need kernel visit\n");
115 #ifdef G4DEBUG_VIS_OGL
116 printf(
"G4OpenGLStoredXViewer::DrawView NEED kernel visit\n");
120 if (fVP.IsCutaway() &&
134 void G4OpenGLStoredXViewer::FinishView () {
135 #ifdef G4DEBUG_VIS_OGL
136 printf(
"G4OpenGLStoredXViewer::FinishView\n");
141 #ifdef G4DEBUG_VIS_OGL
142 printf(
"G4OpenGLStoredXViewer::FinishView flush \n");
147 glGetIntegerv(GL_RENDER_MODE, &renderMode);
148 if (renderMode == GL_RENDER) glXSwapBuffers (dpy, win);
printf("%d Experimental points found\n", nlines)
G4GLOB_DLL std::ostream G4cerr