Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // 28 // 29 // Andrew Walkden 10th February 1997 30 // OpenGL graphics system factory. 31 32 #include "G4VisFeaturesOfOpenGL.hh" 33 #include "G4VSceneHandler.hh" 34 #include "G4OpenGLSceneHandler.hh" 35 #include "G4OpenGLViewer.hh" 36 #include "G4OpenGLImmediateXm.hh" 37 #include "G4OpenGLImmediateXmViewer.hh" 38 #include "G4OpenGLViewerMessenger.hh" 39 #include "G4OpenGLXmViewerMessenger.hh" 40 #include "G4OpenGLImmediateSceneHandler.hh" 41 42 G4OpenGLImmediateXm::G4OpenGLImmediateXm (): 43 G4OpenGLXm ("OpenGLImmediateXm", 44 "OGLIXm", 45 G4VisFeaturesOfOpenGLIXm (), 46 G4VGraphicsSystem::threeD) 47 { 48 G4OpenGLViewerMessenger::GetInstance(); 49 G4OpenGLXmViewerMessenger::GetInstance(); 50 } 51 52 G4OpenGLImmediateXm::~G4OpenGLImmediateXm () { 53 54 G4VSceneHandler* G4OpenGLImmediateXm::CreateSc 55 G4VSceneHandler* pScene = new G4OpenGLImmedi 56 return pScene; 57 } 58 59 G4VViewer* G4OpenGLImmediateXm::CreateViewer ( 60 const G4String& name) { 61 G4VViewer* pView = 62 new G4OpenGLImmediateXmViewer ((G4OpenGLIm 63 if (pView) { 64 if (pView -> GetViewId () < 0) { 65 G4cerr << "G4OpenGLImmediateXm::CreateVi 66 " negative view id in G4OpenGLImmediateXmVie 67 "\n Destroying view and returning null point 68 delete pView; 69 pView = 0; 70 } 71 } 72 else { 73 G4cerr << "G4OpenGLImmediateXm::CreateView 74 " new G4OpenGLImmediateXmViewer." << G4e 75 } 76 return pView; 77 } 78