34 #ifdef G4VIS_BUILD_OPENGL_DRIVER
39 G4OpenGLImmediateViewer::G4OpenGLImmediateViewer (G4OpenGLImmediateSceneHandler& scene):
41 G4OpenGLViewer (scene)
44 void G4OpenGLImmediateViewer::ProcessView ()
46 const G4Planes& cutaways = fVP.GetCutawayPlanes();
47 G4bool cutawayUnion = fVP.IsCutaway() &&
49 size_t nPasses = cutawayUnion? cutaways.size(): 1;
50 for (
size_t i = 0; i < nPasses; ++i) {
54 a[0] = cutaways[i].a();
55 a[1] = cutaways[i].b();
56 a[2] = cutaways[i].c();
57 a[3] = cutaways[i].d();
58 glClipPlane (GL_CLIP_PLANE2, a);
59 glEnable (GL_CLIP_PLANE2);
65 if (cutawayUnion) glDisable (GL_CLIP_PLANE2);