34 #ifdef G4VIS_BUILD_OPENGLXM_DRIVER
42 G4OpenGLStoredXmViewer::
43 G4OpenGLStoredXmViewer (G4OpenGLStoredSceneHandler& sceneHandler,
45 :
G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name),
46 G4OpenGLViewer (sceneHandler),
47 G4OpenGLXmViewer (sceneHandler),
48 G4OpenGLStoredViewer (sceneHandler)
51 if (fViewId < 0)
return;
55 G4cerr <<
"G4OpenGLStoredXmViewer::G4OpenGLStoredXmViewer -"
56 " G4OpenGLXmViewer couldn't get a visual." <<
G4endl;
61 G4OpenGLStoredXmViewer::~G4OpenGLStoredXmViewer () {
62 GetSceneHandler()->RemoveViewerFromList(
this);
65 void G4OpenGLStoredXmViewer::Initialise () {
67 CreateGLXContext (vi_stored);
73 glDrawBuffer (GL_BACK);
76 void G4OpenGLStoredXmViewer::DrawView () {
77 #ifdef G4DEBUG_VIS_OGL
78 printf(
"G4OpenGLStoredXmViewer::DrawView \n");
86 if (!fNeedKernelVisit) KernelVisitDecision ();
87 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
95 #ifdef G4DEBUG_VIS_OGL
96 printf(
"G4OpenGLStoredXmViewer::DrawView () flush\n");
100 HaloingSecondPass ();
107 #ifdef G4DEBUG_VIS_OGL
108 printf(
"G4OpenGLStoredXmViewer::DrawView not hlr \n");
112 if (!kernelVisitWasNeeded) {
113 #ifdef G4DEBUG_VIS_OGL
114 printf(
"G4OpenGLStoredXmViewer::ComputeView Don't need kernel Visit \n");
119 #ifdef G4DEBUG_VIS_OGL
120 printf(
"G4OpenGLStoredXmViewer::ComputeView Need kernel Visit \n");
124 if (fVP.IsCutaway() &&
135 #ifdef G4DEBUG_VIS_OGL
136 printf(
"G4OpenGLStoredXmViewer::DrawView ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
140 void G4OpenGLStoredXmViewer::FinishView () {
144 #ifdef G4DEBUG_VIS_OGL
145 printf(
"G4OpenGLStoredXmViewer::FinishView () flush \n");
150 glGetIntegerv(GL_RENDER_MODE, &renderMode);
151 if (renderMode == GL_RENDER) glXSwapBuffers (dpy, win);
printf("%d Experimental points found\n", nlines)
G4GLOB_DLL std::ostream G4cerr