33#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
41G4OpenGLStoredWin32Viewer::G4OpenGLStoredWin32Viewer
42(G4OpenGLStoredSceneHandler& sceneHandler,
44G4OpenGLViewer (sceneHandler),
45G4OpenGLWin32Viewer (sceneHandler),
46G4OpenGLStoredViewer (sceneHandler),
47G4VViewer (sceneHandler, sceneHandler.IncrementViewCount (), name) {
49 if (fViewId < 0)
return;
52void G4OpenGLStoredWin32Viewer::Initialise () {
56 CreateGLWin32Context ();
64 glDepthFunc (GL_LEQUAL);
65 glDepthMask (GL_TRUE);
68void G4OpenGLStoredWin32Viewer::DrawView () {
73 glViewport (0, 0, getWinWidth(), getWinHeight());
81 if (!fNeedKernelVisit) KernelVisitDecision ();
82 G4bool kernelVisitWasNeeded = fNeedKernelVisit;
101 if (!kernelVisitWasNeeded) {
107 if (fVP.IsCutaway() &&
121void G4OpenGLStoredWin32Viewer::FinishView (
130 glGetIntegerv(GL_RENDER_MODE, &renderMode);
131 if (renderMode == GL_RENDER) ::SwapBuffers(fHDC);
135 while ( ::PeekMessage(&event, NULL, 0, 0, PM_REMOVE) ) {
136 ::TranslateMessage(&event);
137 ::DispatchMessage (&event);