Ignore:
Timestamp:
Jan 5, 2011, 12:19:12 PM (13 years ago)
Author:
garnier
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc

    r1346 r1348  
    2525//
    2626//
    27 // $Id: G4OpenGLSceneHandler.cc,v 1.59 2010/05/30 09:53:05 allison Exp $
     27// $Id: G4OpenGLSceneHandler.cc,v 1.60 2010/12/11 17:04:07 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    488488  G4ViewParameters::DrawingStyle drawing_style = GetDrawingStyle (pVA);
    489489
    490   //Get colour, etc...
    491   G4bool transparency_enabled = true;
     490  // Get colour, etc...
     491  // Need access to data in G4OpenGLViewer.  static_cast doesn't work
     492  // with a virtual base class, so use dynamic_cast.  No need to test
     493  // the outcome since viewer is guaranteed to be a G4OpenGLViewer.
    492494  G4OpenGLViewer* pViewer = dynamic_cast<G4OpenGLViewer*>(fpViewer);
    493   if (pViewer) transparency_enabled = pViewer->transparency_enabled;
     495  const G4bool& transparency_enabled = pViewer->transparency_enabled;
    494496  const G4Colour& c = pVA->GetColour();
    495497  GLfloat materialColour [4];
Note: See TracChangeset for help on using the changeset viewer.