33 #ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
41 G4OpenGLStoredWin32Viewer::G4OpenGLStoredWin32Viewer
42 (G4OpenGLStoredSceneHandler& sceneHandler,
44 G4OpenGLViewer (sceneHandler),
45 G4OpenGLWin32Viewer (sceneHandler),
46 G4OpenGLStoredViewer (sceneHandler),
47 G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name) {
49 if (fViewId < 0)
return;
52 void G4OpenGLStoredWin32Viewer::Initialise () {
56 CreateGLWin32Context ();
64 glDepthFunc (GL_LEQUAL);
65 glDepthMask (GL_TRUE);
68 void G4OpenGLStoredWin32Viewer::DrawView () {
70 glViewport (0, 0, getWinWidth(), getWinHeight());
78 if (!fNeedKernelVisit) KernelVisitDecision ();
79 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
98 if (!kernelVisitWasNeeded) {
104 if (fVP.IsCutaway() &&
118 void G4OpenGLStoredWin32Viewer::FinishView (
127 glGetIntegerv(GL_RENDER_MODE, &renderMode);
128 if (renderMode == GL_RENDER) ::SwapBuffers(fHDC);
132 while ( ::PeekMessage(&event, NULL, 0, 0, PM_REMOVE) ) {
133 ::TranslateMessage(&event);
134 ::DispatchMessage (&event);