32 #if defined (G4VIS_BUILD_OPENGL_DRIVER) || defined (G4VIS_USE_OPENGL)
34 #ifndef G4OPENGLSTOREDSCENEHANDLER_HH
35 #define G4OPENGLSTOREDSCENEHANDLER_HH
45 class G4OpenGLStoredSceneHandler:
public G4OpenGLSceneHandler {
47 friend class G4OpenGLStoredViewer;
52 virtual ~G4OpenGLStoredSceneHandler ();
53 void BeginPrimitives (
const G4Transform3D& objectTransformation);
54 void EndPrimitives ();
55 void BeginPrimitives2D (
const G4Transform3D& objectTransformation);
56 void EndPrimitives2D ();
57 void BeginModeling ();
63 void AddPrimitive (
const G4Text&);
64 void AddPrimitive (
const G4Scale&);
67 void ClearTransientStore ();
69 static G4int GetDisplayListLimit() {
return fDisplayListLimit;}
70 static void SetDisplayListLimit(
G4int lim) {fDisplayListLimit = lim;}
79 void AddPrimitivePostamble();
87 virtual G4bool ExtraPOProcessing
88 (
const G4Visible&,
size_t ) {
return true;}
89 virtual G4bool ExtraTOProcessing
90 (
const G4Visible&,
size_t ) {
return true;}
92 static G4int fSceneIdCount;
94 static G4int fDisplayListId;
95 static G4bool fMemoryForDisplayLists;
96 static G4int fDisplayListLimit;
106 G4TextPlus(
const G4Text& text): fG4Text(text), fProcessing2D(
false) {}
117 PO& operator= (
const PO&);
118 G4int fDisplayListId;
122 G4TextPlus* fpG4TextPlus;
125 std::vector<PO> fPOList;
133 TO& operator= (
const TO&);
134 G4int fDisplayListId;
139 G4TextPlus* fpG4TextPlus;
142 std::vector<TO> fTOList;
146 std::map <const G4VSolid*, G4int, std::less <const G4VSolid*> > fSolidMap;
149 bool AddPrimitivePreambleInternal(
const G4Visible&
visible,
bool isMarker,
bool isPolyline);