33#ifdef G4VIS_BUILD_OPENGLX_DRIVER
41G4OpenGLStoredXViewer::
42G4OpenGLStoredXViewer (G4OpenGLStoredSceneHandler& sceneHandler,
44 :
G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (),
name),
45 G4OpenGLViewer (sceneHandler),
46 G4OpenGLXViewer (sceneHandler),
47 G4OpenGLStoredViewer (sceneHandler)
49 if (fViewId < 0)
return;
53 G4cerr <<
"G4OpenGLStoredXViewer::G4OpenGLStoredXViewer -"
54 " G4OpenGLXViewer couldn't get a visual." <<
G4endl;
59G4OpenGLStoredXViewer::~G4OpenGLStoredXViewer () {}
61void G4OpenGLStoredXViewer::Initialise () {
64 printf(
"G4OpenGLStoredXViewer::Initialise\n");
66 CreateGLXContext (vi_stored);
72 glDrawBuffer (GL_BACK);
75void G4OpenGLStoredXViewer::DrawView () {
78 printf(
"G4OpenGLStoredXViewer::DrawView\n");
87 if (!fNeedKernelVisit) KernelVisitDecision ();
89 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
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() &&
134void 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);
G4GLOB_DLL std::ostream G4cerr
const char * name(G4int ptype)