- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredSceneHandler.cc,v 1.4 2 2010/06/03 08:23:02allison 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: $ 29 29 // 30 30 // … … 106 106 if (fMemoryForDisplayLists) { 107 107 fDisplayListId = glGenLists (1); 108 if (glGetError() == GL_OUT_OF_MEMORY) { // Could pre-allocate? 108 if (glGetError() == GL_OUT_OF_MEMORY || 109 fDisplayListId > fDisplayListLimit + fDisplayListBase) { 109 110 G4cout << 110 111 "********************* 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\"." 113 117 "\n***************************************************" 114 118 << G4endl; … … 351 355 glDeleteLists(fTOList[i].fDisplayListId, 1); 352 356 fTOList.clear (); 357 358 fDisplayListBase = fDisplayListId; 353 359 } 354 360 … … 361 367 glDeleteLists(fTOList[i].fDisplayListId, 1); 362 368 fTOList.clear (); 369 370 fDisplayListBase = fDisplayListId; 363 371 364 372 // Make sure screen corresponds to graphical database... … … 463 471 G4int G4OpenGLStoredSceneHandler::fSceneIdCount = 0; 464 472 473 G4int G4OpenGLStoredSceneHandler::fDisplayListLimit = 50000; 474 475 G4int G4OpenGLStoredSceneHandler::fDisplayListBase = 0; 476 465 477 #endif
Note: See TracChangeset
for help on using the changeset viewer.