33 #if defined (G4VIS_BUILD_OPENGL_DRIVER) || defined (G4VIS_USE_OPENGL)
35 #ifndef G4OPENGLSCENEHANDLER_HH
36 #define G4OPENGLSCENEHANDLER_HH
50 friend class G4OpenGLViewer;
62 void AddPrimitivesCircle (
const std::vector <G4VMarker>&);
63 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 #if defined (G4VIS_BUILD_OPENGLWT_DRIVER) || defined (G4VIS_USE_OPENGLWT)
128 Wt::WGLWidget::Buffer fVertexBufferObject;
129 Wt::WGLWidget::Buffer fIndicesBufferObject;
131 GLuint fVertexBufferObject;
132 GLuint 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