Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // >> 24 // $Id: G4OpenGLImmediateXm.cc,v 1.10 2005/06/02 17:43:46 allison Exp $ >> 25 // GEANT4 tag $Name: geant4-08-00-patch-01 $ 27 // 26 // 28 // 27 // 29 // Andrew Walkden 10th February 1997 28 // Andrew Walkden 10th February 1997 30 // OpenGL graphics system factory. 29 // OpenGL graphics system factory. 31 30 >> 31 #ifdef G4VIS_BUILD_OPENGLXM_DRIVER >> 32 32 #include "G4VisFeaturesOfOpenGL.hh" 33 #include "G4VisFeaturesOfOpenGL.hh" 33 #include "G4VSceneHandler.hh" 34 #include "G4VSceneHandler.hh" 34 #include "G4OpenGLSceneHandler.hh" 35 #include "G4OpenGLSceneHandler.hh" 35 #include "G4OpenGLViewer.hh" 36 #include "G4OpenGLViewer.hh" 36 #include "G4OpenGLImmediateXm.hh" 37 #include "G4OpenGLImmediateXm.hh" 37 #include "G4OpenGLImmediateXmViewer.hh" 38 #include "G4OpenGLImmediateXmViewer.hh" 38 #include "G4OpenGLViewerMessenger.hh" << 39 #include "G4OpenGLXmViewerMessenger.hh" << 40 #include "G4OpenGLImmediateSceneHandler.hh" << 41 39 42 G4OpenGLImmediateXm::G4OpenGLImmediateXm (): 40 G4OpenGLImmediateXm::G4OpenGLImmediateXm (): 43 G4OpenGLXm ("OpenGLImmediateXm", << 41 G4VGraphicsSystem ("OpenGLImmediateXm", 44 "OGLIXm", << 42 "OGLIXm", 45 G4VisFeaturesOfOpenGLIXm (), << 43 G4VisFeaturesOfOpenGLIXm (), 46 G4VGraphicsSystem::threeD) << 44 G4VGraphicsSystem::threeD) {} 47 { << 48 G4OpenGLViewerMessenger::GetInstance(); << 49 G4OpenGLXmViewerMessenger::GetInstance(); << 50 } << 51 45 52 G4OpenGLImmediateXm::~G4OpenGLImmediateXm () { 46 G4OpenGLImmediateXm::~G4OpenGLImmediateXm () {} 53 47 54 G4VSceneHandler* G4OpenGLImmediateXm::CreateSc 48 G4VSceneHandler* G4OpenGLImmediateXm::CreateSceneHandler (const G4String& name) { 55 G4VSceneHandler* pScene = new G4OpenGLImmedi 49 G4VSceneHandler* pScene = new G4OpenGLImmediateSceneHandler (*this, name); 56 return pScene; 50 return pScene; 57 } 51 } 58 52 59 G4VViewer* G4OpenGLImmediateXm::CreateViewer ( 53 G4VViewer* G4OpenGLImmediateXm::CreateViewer (G4VSceneHandler& scene, 60 const G4String& name) { 54 const G4String& name) { 61 G4VViewer* pView = 55 G4VViewer* pView = 62 new G4OpenGLImmediateXmViewer ((G4OpenGLIm 56 new G4OpenGLImmediateXmViewer ((G4OpenGLImmediateSceneHandler&) scene, name); 63 if (pView) { 57 if (pView) { 64 if (pView -> GetViewId () < 0) { 58 if (pView -> GetViewId () < 0) { 65 G4cerr << "G4OpenGLImmediateXm::CreateVi 59 G4cerr << "G4OpenGLImmediateXm::CreateViewer: error flagged by" 66 " negative view id in G4OpenGLImmediateXmVie 60 " negative view id in G4OpenGLImmediateXmViewer creation." 67 "\n Destroying view and returning null point 61 "\n Destroying view and returning null pointer." << G4endl; 68 delete pView; 62 delete pView; 69 pView = 0; 63 pView = 0; 70 } 64 } 71 } 65 } 72 else { 66 else { 73 G4cerr << "G4OpenGLImmediateXm::CreateView 67 G4cerr << "G4OpenGLImmediateXm::CreateViewer: null pointer on" 74 " new G4OpenGLImmediateXmViewer." << G4e 68 " new G4OpenGLImmediateXmViewer." << G4endl; 75 } 69 } 76 return pView; 70 return pView; 77 } 71 } >> 72 >> 73 #endif 78 74