34#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
41G4OpenGLStoredXmViewer::
42G4OpenGLStoredXmViewer (G4OpenGLStoredSceneHandler& sceneHandler,
44 :
G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name),
45 G4OpenGLViewer (sceneHandler),
46 G4OpenGLXmViewer (sceneHandler),
47 G4OpenGLStoredViewer (sceneHandler)
50 if (fViewId < 0)
return;
54 G4cerr <<
"G4OpenGLStoredXmViewer::G4OpenGLStoredXmViewer -"
55 " G4OpenGLXmViewer couldn't get a visual." <<
G4endl;
60G4OpenGLStoredXmViewer::~G4OpenGLStoredXmViewer () {
61 GetSceneHandler()->RemoveViewerFromList(
this);
64void G4OpenGLStoredXmViewer::Initialise () {
66 CreateGLXContext (vi_stored);
72 glDrawBuffer (GL_BACK);
75void G4OpenGLStoredXmViewer::DrawView () {
77 printf(
"G4OpenGLStoredXmViewer::DrawView \n");
81 glXMakeCurrent (dpy, win, cx);
88 if (!fNeedKernelVisit) KernelVisitDecision ();
89 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
98 printf(
"G4OpenGLStoredXmViewer::DrawView () flush\n");
102 HaloingSecondPass ();
109#ifdef G4DEBUG_VIS_OGL
110 printf(
"G4OpenGLStoredXmViewer::DrawView not hlr \n");
114 if (!kernelVisitWasNeeded) {
115#ifdef G4DEBUG_VIS_OGL
116 printf(
"G4OpenGLStoredXmViewer::ComputeView Don't need kernel Visit \n");
121#ifdef G4DEBUG_VIS_OGL
122 printf(
"G4OpenGLStoredXmViewer::ComputeView Need kernel Visit \n");
126 if (fVP.IsCutaway() &&
137#ifdef G4DEBUG_VIS_OGL
138 printf(
"G4OpenGLStoredXmViewer::DrawView ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
142void G4OpenGLStoredXmViewer::FinishView () {
146#ifdef G4DEBUG_VIS_OGL
147 printf(
"G4OpenGLStoredXmViewer::FinishView () flush \n");
152 glGetIntegerv(GL_RENDER_MODE, &renderMode);
153 if (renderMode == GL_RENDER) glXSwapBuffers (dpy, win);
G4DLLIMPORT std::ostream G4cerr