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/G4OpenGLStoredSceneHandler.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredSceneHandler.cc,v 1.42 2010/06/03 08:23:02 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4OpenGLStoredSceneHandler.cc,v 1.43 2010/11/05 06:25:23 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    106106  if (fMemoryForDisplayLists) {
    107107    fDisplayListId = glGenLists (1);
    108     if (glGetError() == GL_OUT_OF_MEMORY) {  // Could pre-allocate?
     108    if (glGetError() == GL_OUT_OF_MEMORY ||
     109        fDisplayListId > fDisplayListLimit + fDisplayListBase) {
    109110      G4cout <<
    110111        "********************* WARNING! ********************"
    111         "\nUnable to allocate any more display lists in OpenGL."
    112         "\n     Continuing drawing in IMMEDIATE MODE."
     112        "\n  Display list limit reached in OpenGL."
     113        "\n  Continuing drawing in IMMEDIATE MODE."
     114        "\n  Current limit: "
     115             << fDisplayListLimit <<
     116        ".  Change with \"/vis/ogl/set/displayListLimit\"."
    113117        "\n***************************************************"
    114118             << G4endl;
     
    351355    glDeleteLists(fTOList[i].fDisplayListId, 1);
    352356  fTOList.clear ();
     357
     358  fDisplayListBase = fDisplayListId;
    353359}
    354360
     
    361367    glDeleteLists(fTOList[i].fDisplayListId, 1);
    362368  fTOList.clear ();
     369
     370  fDisplayListBase = fDisplayListId;
    363371
    364372  // Make sure screen corresponds to graphical database...
     
    463471G4int G4OpenGLStoredSceneHandler::fSceneIdCount = 0;
    464472
     473G4int G4OpenGLStoredSceneHandler::fDisplayListLimit = 50000;
     474
     475G4int G4OpenGLStoredSceneHandler::fDisplayListBase = 0;
     476
    465477#endif
Note: See TracChangeset for help on using the changeset viewer.