32 #ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
40 G4OpenGLStoredWin32Viewer::G4OpenGLStoredWin32Viewer
41 (G4OpenGLStoredSceneHandler& sceneHandler,
43 G4OpenGLViewer (sceneHandler),
44 G4OpenGLWin32Viewer (sceneHandler),
45 G4OpenGLStoredViewer (sceneHandler),
46 G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name) {
48 if (fViewId < 0)
return;
51 void G4OpenGLStoredWin32Viewer::Initialise () {
55 CreateGLWin32Context ();
63 glDepthFunc (GL_LEQUAL);
64 glDepthMask (GL_TRUE);
67 void G4OpenGLStoredWin32Viewer::DrawView () {
69 glViewport (0, 0, getWinWidth(), getWinHeight());
77 if (!fNeedKernelVisit) KernelVisitDecision ();
78 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
97 if (!kernelVisitWasNeeded) {
103 if (fVP.IsCutaway() &&
117 void G4OpenGLStoredWin32Viewer::FinishView (
126 glGetIntegerv(GL_RENDER_MODE, &renderMode);
127 if (renderMode == GL_RENDER) ::SwapBuffers(fHDC);
131 while ( ::PeekMessage(&event, NULL, 0, 0, PM_REMOVE) ) {
132 ::TranslateMessage(&event);
133 ::DispatchMessage (&event);