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>&);
98 static G4int GetEntitiesFlushInterval()
99 {
return fEntitiesFlushInterval;}
100 static FlushAction GetFlushAction()
101 {
return fFlushAction;}
102 static void SetEntitiesFlushInterval(
G4int interval)
103 {fEntitiesFlushInterval = interval;}
104 static void SetFlushAction(FlushAction action)
105 {fFlushAction = action;}
107 #ifdef G4OPENGL_VERSION_2
110 std::vector<double> fOglVertex;
112 std::vector<unsigned short> fOglIndices;
115 GLenum fDrawArrayType;
117 bool fEmulate_GL_QUADS;
119 void OptimizeVBOForTrd();
120 void OptimizeVBOForCons(
G4int aNoFacet);
123 void glBeginVBO(GLenum type);
124 void drawVBOArray(std::vector<double> vertices);
127 #ifndef G4VIS_BUILD_OPENGLWT_DRIVER
128 GLuint fVertexBufferObject;
129 GLuint fIndicesBufferObject;
131 Wt::WGLWidget::Buffer fVertexBufferObject;
132 Wt::WGLWidget::Buffer fIndicesBufferObject;
133 #endif // G4VIS_BUILD_OPENGLWT_DRIVER
135 #endif //G4OPENGL_VERSION_2
142 virtual ~G4OpenGLSceneHandler ();
148 void ClearAndDestroyAtts();
150 #ifdef G4OPENGL_VERSION_2
157 inline void setVboDrawer(G4OpenGLVboDrawer* drawer) {
160 G4OpenGLVboDrawer* fVboDrawer;
161 #endif // G4OPENGL_VERSION_2
164 std::map<GLuint, G4AttHolder*> fPickMap;
167 void ScaledFlush () ;
169 static FlushAction fFlushAction;
171 static G4int fEntitiesFlushInterval;
176 G4bool fSecondPassForTransparencyRequested;
177 G4bool fSecondPassForTransparency;
179 G4bool fThirdPassForNonHiddenMarkersRequested;
180 G4bool fThirdPassForNonHiddenMarkers;
182 static const GLubyte fStippleMaskHashed [128];
186 #include "G4OpenGLSceneHandler.icc"
188 #endif // G4OPENGLSCENEHANDLER_HH
190 #endif // G4VIS_BUILD_OPENGL_DRIVER
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()
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
virtual void EndPrimitives2D()