34 #ifdef G4VIS_BUILD_OPENGL_DRIVER
36 #ifndef G4OPENGLSCENEHANDLER_HH
37 #define G4OPENGLSCENEHANDLER_HH
51 friend class G4OpenGLViewer;
63 void AddPrimitivesCircle (
const std::vector <G4VMarker>&);
64 void AddPrimitivesSquare (
const std::vector <G4VMarker>&);
86 G4int GetEventsDrawInterval() {
return fEventsDrawInterval;}
87 void SetEventsDrawInterval(
G4int interval) {fEventsDrawInterval = interval;}
89 #ifdef G4OPENGL_VERSION_2
92 std::vector<double> fOglVertex;
94 std::vector<unsigned short> fOglIndices;
97 GLenum fDrawArrayType;
99 bool fEmulate_GL_QUADS;
101 void OptimizeVBOForTrd();
102 void OptimizeVBOForCons(
G4int aNoFacet);
105 void glBeginVBO(GLenum type);
106 void drawVBOArray(std::vector<double> vertices);
109 #ifndef G4VIS_BUILD_OPENGLWT_DRIVER
110 GLuint fVertexBufferObject;
111 GLuint fIndicesBufferObject;
113 Wt::WGLWidget::Buffer fVertexBufferObject;
114 Wt::WGLWidget::Buffer fIndicesBufferObject;
124 virtual ~G4OpenGLSceneHandler ();
130 void ClearAndDestroyAtts();
132 #ifdef G4VIS_BUILD_OPENGLWT_DRIVER
137 inline void setWtDrawer(G4OpenGLWtDrawer* drawer) {
140 G4OpenGLWtDrawer* fWtDrawer;
144 std::map<GLuint, G4AttHolder*> fPickMap;
147 void ScaledFlush () ;
149 G4int fEventsDrawInterval;
151 G4int fEventsWaitingToBeFlushed;
156 G4bool fSecondPassForTransparencyRequested;
157 G4bool fSecondPassForTransparency;
159 G4bool fThirdPassForNonHiddenMarkersRequested;
160 G4bool fThirdPassForNonHiddenMarkers;
162 static const GLubyte fStippleMaskHashed [128];
165 #include "G4OpenGLSceneHandler.icc"
virtual void AddSolid(const G4Box &)
virtual G4VSolid * CreateSectionSolid()
virtual void BeginPrimitives(const G4Transform3D &objectTransformation)
virtual void AddPrimitive(const G4Polyline &)=0
virtual G4VSolid * CreateCutawaySolid()
virtual void EndPrimitives()
virtual void BeginPrimitives2D(const G4Transform3D &objectTransformation)
virtual void AddCompound(const G4VTrajectory &)
virtual void ProcessScene()
system("rm -rf dna.root")
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
virtual void EndPrimitives2D()