33#ifndef G4OpenGLVboDrawer_HH
34#define G4OpenGLVboDrawer_HH
38#ifdef G4OPENGL_VERSION_2
42#define GL2PS_TEXT_BL 5
43#define GL2PS_TEXT_BR 6
50#define glEdgeFlag(a) fVboDrawer->empty()
51#define glRenderMode(a) fVboDrawer->returnNULL()
52#define glClipPlane(a,b) fVboDrawer->empty()
53#define glGetIntegerv(a,b) fVboDrawer->empty()
54#define glGetFloatv(a,b) fVboDrawer->empty()
55#define glGetDoublev(a,b) fVboDrawer->empty()
56#define glPassThrough fVboDrawer->empty()
57#define glGetBooleanv fVboDrawer->empty()
58#define glLoadName(a) fVboDrawer->empty()
59#define glPushMatrix() fVboDrawer->empty()
60#define glLoadIdentity() fVboDrawer->empty()
61#define glPopMatrix() fVboDrawer->empty()
62#define glCallList(a) fVboDrawer->empty()
63#define glGenLists(a) fVboDrawer->returnNULL()
64#define glVertex3d fVboDrawer->empty()
65#define glBegin fVboDrawer->empty()
66#define glEnd fVboDrawer->empty()
67#define glNewList(a,b) fVboDrawer->empty()
68#define glEndList() fVboDrawer->empty()
69#define glPolygonMode(a,b) fVboDrawer->empty()
70#define glDrawBuffer(a) fVboDrawer->empty()
71#define glDeleteLists(a,b) fVboDrawer->empty()
72#define glStencilFunc(a,b,c) fVboDrawer->empty()
73#define glStencilOp(a,b,c) fVboDrawer->empty()
74#define glColorMaterial(a,b) fVboDrawer->empty()
75#define glLightfv(a,b,c) fVboDrawer->empty()
76#define glScaled(a,b,c) fVboDrawer->empty()
77#define gluLookAt fVboDrawer->empty()
78#define gluPickMatrix fVboDrawer->empty()
79#define glSelectBuffer(a,b) fVboDrawer->empty()
80#define glInitNames() fVboDrawer->empty()
81#define glPushNames(a) fVboDrawer->empty()
82#define glPushName(a) fVboDrawer->empty()
83#define glPixelStorei(a,b) fVboDrawer->empty()
84#define glRasterPos3d(a,b,c) fVboDrawer->empty()
85#define Geant4_gl2psTextOpt(a,b,c,d,e) fVboDrawer->empty()
86#define glMaterialfv(a,b,c) fVboDrawer->empty()
87#define glCullFace(a) fVboDrawer->empty()
88#define glReadBuffer(a) fVboDrawer->empty()
89#define glReadPixels(a,b,c,d,e,f,g) fVboDrawer->empty()
90#define glTranslatef(a,b,c) fVboDrawer->empty()
98#define glOrtho fVboDrawer->vboGlOrtho
99#define glFrustum fVboDrawer->vboGlFrustum
100#define glMultMatrixf fVboDrawer->vboGlMultMatrixf
101#define glMultMatrixd fVboDrawer->vboGlMultMatrixd
102#define glMatrixMode fVboDrawer->vboGlMatrixMode
103#define glPointSize fVboDrawer->vboGlPointSize
104#define glColor3d fVboDrawer->vboGlColor3d
105#define glColor4d fVboDrawer->vboGlColor4d
106#define glColor4fv fVboDrawer->vboGlColor4fv
111class G4OpenGLVboDrawer {
117 virtual ~G4OpenGLVboDrawer ();
119 void vboGlMultMatrixf(
const GLfloat *m );
120 void vboGlMultMatrixd(
const GLdouble *m );
123 void vboGlOrtho(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
124 void vboGlFrustum(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
125 void vboGlMatrixMode(GLenum);
126 void vboGlPointSize(
float size);
127 inline void vboGlColor3d(
int red,
int green,
int blue) {
128 vboGlColor4d(red,green, blue, 1.0);
130 void vboGlColor4d(
int red,
int green,
int blue,
int alpha);
131 void vboGlColor4fv(
const GLfloat*);
132 inline const char * getFragmentShaderSrc() {
133 return fFragmentShaderSrc;
135 inline const char * getVertexShaderSrc() {
136 return fVertexShaderSrc;
138 inline bool isVBO() {
139 if ((fOGLType ==
"OGL-ES") || (fOGLType ==
"OGL-VBO")) {
144 inline void empty() {}
145 inline GLuint returnNULL() {
150 const char *fFragmentShaderSrc;
151 const char *fVertexShaderSrc;
152 std::string fOGLType;