| 71 | } |
| 72 | |
| 73 | void G4OpenGLStoredXViewer::DrawView () { |
| 74 | |
| 75 | #ifdef G4DEBUG_VIS_OGL |
| 76 | printf("G4OpenGLStoredXViewer::DrawView\n"); |
| 77 | #endif |
| 78 | |
| 79 | G4ViewParameters::DrawingStyle style = GetViewParameters().GetDrawingStyle(); |
| 80 | |
| 81 | // See if things have changed from last time and remake if necessary... |
| 82 | // The fNeedKernelVisit flag might have been set by the user in |
| 83 | // /vis/viewer/rebuild, but if not, make decision and set flag only |
| 84 | // if necessary... |
| 85 | if (!fNeedKernelVisit) KernelVisitDecision (); |
| 86 | fLastVP = fVP; |
| 87 | G4bool kernelVisitWasNeeded = fNeedKernelVisit; // Keep (ProcessView resets). |
| 88 | ProcessView (); |
| 89 | |
| 90 | if(style!=G4ViewParameters::hlr && haloing_enabled) { |
| 91 | |
| 92 | HaloingFirstPass (); |
| 93 | DrawDisplayLists (); |
| 94 | #ifdef G4DEBUG_VIS_OGL |
| 95 | printf("G4OpenGLStoredXViewer::DrawView flush \n"); |
| 96 | #endif |
| 97 | glFlush (); |
| 98 | |
| 99 | HaloingSecondPass (); |
| 100 | |
| 101 | DrawDisplayLists (); |
| 102 | |
| 103 | } else { |
| 104 | |
| 105 | if (!kernelVisitWasNeeded) { |
| 106 | #ifdef G4DEBUG_VIS_OGL |
| 107 | printf("G4OpenGLStoredXViewer::DrawView NO need kernel visit\n"); |
| 108 | #endif |
| 109 | DrawDisplayLists (); |
| 110 | |
| 111 | } else { |
| 112 | |
| 113 | #ifdef G4DEBUG_VIS_OGL |
| 114 | printf("G4OpenGLStoredXViewer::DrawView NEED kernel visit\n"); |
| 115 | #endif |
| 116 | // However, union cutaways are implemented in DrawDisplayLists, so make |
| 117 | // an extra pass... |
| 118 | if (fVP.IsCutaway() && |
| 119 | fVP.GetCutawayMode() == G4ViewParameters::cutawayUnion) { |
| 120 | ClearView(); |
| 121 | DrawDisplayLists (); |
| 122 | } else { // ADD TO AVOID KernelVisit=1 and nothing to display |
| 123 | DrawDisplayLists (); |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | FinishView (); |
| 129 | |
| 130 | } |
no test coverage detected