Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

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

    r1314 r1340  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredViewer.cc,v 1.26 2009/04/08 16:55:44 lgarnier Exp $
    28 // GEANT4 tag $Name: vis-V09-03-06 $
     27// $Id: G4OpenGLStoredViewer.cc,v 1.29 2010/10/06 10:05:52 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    8888      (lastVP.GetNoOfSides ()       != fVP.GetNoOfSides ())       ||
    8989      (lastVP.IsMarkerNotHidden ()  != fVP.IsMarkerNotHidden ())  ||
     90      (lastVP.GetDefaultVisAttributes()->GetColour() !=
     91       fVP.GetDefaultVisAttributes()->GetColour())                ||
     92      (lastVP.GetDefaultTextVisAttributes()->GetColour() !=
     93       fVP.GetDefaultTextVisAttributes()->GetColour())            ||
    9094      (lastVP.GetBackgroundColour ()!= fVP.GetBackgroundColour ())||
    9195      (lastVP.IsPicking ()          != fVP.IsPicking ())
     
    165169        glMultMatrixd (oglt.GetGLMatrix ());
    166170        if (fVP.IsPicking()) glLoadName(to.fPickName);
    167         G4Colour& c = to.fColour;
     171        const G4Colour& c = to.fColour;
     172        const G4Colour& bg = fVP.GetBackgroundColour();
    168173        G4double bsf = 1.;  // Brightness scaling factor.
    169174        if (fFadeFactor > 0. && to.fEndTime < fEndTime)
    170175          bsf = 1. - fFadeFactor *
    171176            ((fEndTime - to.fEndTime) / (fEndTime - fStartTime));
    172         glColor3d(bsf * c.GetRed (), bsf * c.GetGreen (), bsf * c.GetBlue ());
     177        glColor3d
     178          (bsf * c.GetRed() + (1. - bsf) * bg.GetRed(),
     179           bsf * c.GetGreen() + (1. - bsf) * bg.GetGreen(),
     180           bsf * c.GetBlue() + (1. - bsf) * bg.GetBlue());
    173181        glCallList (to.fDisplayListId);
    174182        glPopMatrix();
Note: See TracChangeset for help on using the changeset viewer.