33#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");
85 if (!fNeedKernelVisit) KernelVisitDecision ();
87 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
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");
140void 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);
G4GLOB_DLL std::ostream G4cerr
const char * name(G4int ptype)