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;
142 virtual ~G4OpenGLSceneHandler ();
148 void ClearAndDestroyAtts();
150#ifdef G4OPENGL_VERSION_2
157 inline void setVboDrawer(G4OpenGLVboDrawer* drawer) {
160 G4OpenGLVboDrawer* fVboDrawer;
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"
virtual void EndPrimitives()
virtual G4DisplacedSolid * CreateSectionSolid()
virtual void ProcessScene()
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
virtual void EndPrimitives2D()
virtual void BeginPrimitives2D(const G4Transform3D &objectTransformation=G4Transform3D())
virtual G4DisplacedSolid * CreateCutawaySolid()
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())
virtual void AddSolid(const G4Box &)
virtual void AddCompound(const G4VTrajectory &)
virtual void AddPrimitive(const G4Polyline &)=0