26 #if ! defined (octave_qopengl_functions_h)
27 #define octave_qopengl_functions_h 1
31 #if defined (HAVE_QOPENGLFUNCTIONS_1_1)
32 # include <QOpenGLFunctions_1_1>
46 #if defined (HAVE_QOPENGLFUNCTIONS_1_1)
59 #if defined (HAVE_QOPENGLFUNCTIONS_1_1)
60 m_glfcns.initializeOpenGLFunctions ();
64 #if defined (HAVE_QOPENGLFUNCTIONS_1_1)
68 m_glfcns.glAlphaFunc (func, ref);
73 m_glfcns.glBegin (mode);
78 m_glfcns.glBindTexture (target, texture);
81 void glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig,
82 GLfloat xmove, GLfloat ymove,
const GLubyte *bitmap)
84 m_glfcns.glBitmap (width, height, xorig, yorig, xmove, ymove, bitmap);
89 m_glfcns.glBlendFunc (sfactor, dfactor);
94 m_glfcns.glCallList (list);
97 void glClearColor (GLclampf red, GLclampf green, GLclampf blue,
100 m_glfcns.glClearColor (red, green, blue, alpha);
105 m_glfcns.glClear (mask);
108 void glClipPlane (GLenum plane,
const GLdouble *equation)
110 m_glfcns.glClipPlane (plane, equation);
115 m_glfcns.glColor3dv (v);
118 void glColor3f (GLfloat red, GLfloat green, GLfloat blue)
120 m_glfcns.glColor3f (red, green, blue);
125 m_glfcns.glColor3fv (v);
128 void glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
130 m_glfcns.glColor4d (red, green, blue, alpha);
133 void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
135 m_glfcns.glColor4f (red, green, blue, alpha);
140 m_glfcns.glColor4fv (v);
145 m_glfcns.glDeleteLists (list, range);
150 m_glfcns.glDeleteTextures (
n, textures);
155 m_glfcns.glDepthFunc (func);
160 m_glfcns.glDisable (cap);
164 GLenum
type,
const GLvoid *pixels)
166 m_glfcns.glDrawPixels (width, height,
format,
type, pixels);
171 m_glfcns.glEdgeFlag (flag);
176 m_glfcns.glEnable (cap);
181 m_glfcns.glEndList ();
191 m_glfcns.glFinish ();
196 return m_glfcns.glGenLists (range);
201 m_glfcns.glGenTextures (
n, textures);
206 m_glfcns.glGetBooleanv (pname, data);
211 m_glfcns.glGetDoublev (pname, data);
216 return m_glfcns.glGetError ();
221 m_glfcns.glGetFloatv (pname, data);
226 m_glfcns.glGetIntegerv (pname, data);
231 return m_glfcns.glGetString (
name);
234 void glHint (GLenum target, GLenum mode)
236 m_glfcns.glHint (target, mode);
241 m_glfcns.glInitNames ();
246 return m_glfcns.glIsEnabled (cap);
249 void glLightfv (GLenum
light, GLenum pname,
const GLfloat *params)
251 m_glfcns.glLightfv (
light, pname, params);
256 m_glfcns.glLineStipple (factor, pattern);
261 m_glfcns.glLineWidth (width);
266 m_glfcns.glLoadIdentity ();
269 void glMaterialf (GLenum face, GLenum pname, GLfloat param)
271 m_glfcns.glMaterialf (face, pname, param);
274 void glMaterialfv (GLenum face, GLenum pname,
const GLfloat *params)
276 m_glfcns.glMaterialfv (face, pname, params);
281 m_glfcns.glMatrixMode (mode);
286 m_glfcns.glMultMatrixd (
m);
289 void glNewList (GLuint list, GLenum mode)
291 m_glfcns.glNewList (list, mode);
294 void glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz)
296 m_glfcns.glNormal3d (nx, ny, nz);
301 m_glfcns.glNormal3dv (v);
304 void glOrtho (GLdouble
left, GLdouble right, GLdouble bottom, GLdouble top,
305 GLdouble near_val, GLdouble far_val)
307 m_glfcns.glOrtho (
left, right, bottom, top, near_val, far_val);
312 m_glfcns.glPixelStorei (pname, param);
315 void glPixelZoom (GLfloat xfactor, GLfloat yfactor)
317 m_glfcns.glPixelZoom (xfactor, yfactor);
322 m_glfcns.glPolygonMode (face, mode);
327 m_glfcns.glPolygonOffset (factor, units);
332 m_glfcns.glPopAttrib ();
337 m_glfcns.glPopMatrix ();
342 m_glfcns.glPopName ();
347 m_glfcns.glPushAttrib (mask);
352 m_glfcns.glPushMatrix ();
357 m_glfcns.glPushName (
name);
362 m_glfcns.glRasterPos3d (
x, y, z);
365 void glReadPixels (GLint
x, GLint y, GLsizei width, GLsizei height,
368 m_glfcns.glReadPixels (
x, y, width, height,
format,
type, pixels);
373 return m_glfcns.glRenderMode (mode);
376 void glRotated (GLdouble angle, GLdouble
x, GLdouble y, GLdouble z)
378 m_glfcns.glRotated (angle,
x, y, z);
381 void glScaled (GLdouble
x, GLdouble y, GLdouble z)
383 m_glfcns.glScaled (
x, y, z);
386 void glScalef (GLfloat
x, GLfloat y, GLfloat z)
388 m_glfcns.glScalef (
x, y, z);
393 m_glfcns.glSelectBuffer (size, buffer);
398 m_glfcns.glShadeModel (mode);
403 m_glfcns.glTexCoord2d (s, t);
406 void glTexImage2D (GLenum target, GLint level, GLint internalFormat,
407 GLsizei width, GLsizei height, GLint border,
408 GLenum
format, GLenum
type,
const GLvoid *pixels)
410 m_glfcns.glTexImage2D (target, level, internalFormat, width, height,
416 m_glfcns.glTexParameteri (target, pname, param);
421 m_glfcns.glTranslated (
x, y, z);
426 m_glfcns.glTranslatef (
x, y, z);
431 m_glfcns.glVertex2d (
x, y);
434 void glVertex3d (GLdouble
x, GLdouble y, GLdouble z)
436 m_glfcns.glVertex3d (
x, y, z);
441 m_glfcns.glVertex3dv (v);
444 void glViewport (GLint
x, GLint y, GLsizei width, GLsizei height)
446 m_glfcns.glViewport (
x, y, width, height);
451 QOpenGLFunctions_1_1 m_glfcns;
virtual void glBindTexture(GLenum target, GLuint texture)
virtual void glGetDoublev(GLenum pname, GLdouble *data)
virtual void glScalef(GLfloat x, GLfloat y, GLfloat z)
virtual void glPolygonMode(GLenum face, GLenum mode)
virtual void glMultMatrixd(const GLdouble *m)
virtual void glBegin(GLenum mode)
virtual void glDisable(GLenum cap)
virtual void glNormal3dv(const GLdouble *v)
virtual void glSelectBuffer(GLsizei size, GLuint *buffer)
virtual void glGenTextures(GLsizei n, GLuint *textures)
virtual void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
virtual void glPolygonOffset(GLfloat factor, GLfloat units)
virtual void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val)
virtual void glVertex2d(GLdouble x, GLdouble y)
virtual void glDepthFunc(GLenum func)
virtual void glPixelStorei(GLenum pname, GLint param)
virtual void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
virtual void glColor3dv(const GLdouble *v)
virtual void glLineStipple(GLint factor, GLushort pattern)
virtual void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
virtual void glShadeModel(GLenum mode)
virtual void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
virtual void glAlphaFunc(GLenum func, GLclampf ref)
virtual void glBlendFunc(GLenum sfactor, GLenum dfactor)
virtual void glGetIntegerv(GLenum pname, GLint *data)
virtual void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
virtual const GLubyte * glGetString(GLenum name)
virtual GLboolean glIsEnabled(GLenum cap)
virtual void glDeleteTextures(GLsizei n, const GLuint *textures)
virtual void glClipPlane(GLenum plane, const GLdouble *equation)
virtual void glColor3f(GLfloat red, GLfloat green, GLfloat blue)
virtual GLint glRenderMode(GLenum mode)
virtual void glEdgeFlag(GLboolean flag)
virtual void glPixelZoom(GLfloat xfactor, GLfloat yfactor)
virtual void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
virtual void glPopMatrix(void)
virtual void glScaled(GLdouble x, GLdouble y, GLdouble z)
virtual void glGetBooleanv(GLenum pname, GLboolean *data)
virtual void glLineWidth(GLfloat width)
virtual void glEnable(GLenum cap)
virtual void glPushAttrib(GLbitfield mask)
virtual void glInitNames(void)
virtual void glVertex3d(GLdouble x, GLdouble y, GLdouble z)
virtual void glDeleteLists(GLuint list, GLsizei range)
virtual void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
virtual void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
virtual void glCallList(GLuint list)
virtual GLuint glGenLists(GLsizei range)
virtual void glEndList(void)
virtual void glLoadIdentity(void)
virtual void glNewList(GLuint list, GLenum mode)
virtual void glTranslated(GLdouble x, GLdouble y, GLdouble z)
virtual void glFinish(void)
virtual void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
virtual void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
virtual void glPopAttrib(void)
virtual void glGetFloatv(GLenum pname, GLfloat *data)
virtual GLenum glGetError(void)
virtual void glHint(GLenum target, GLenum mode)
virtual void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
virtual void glPopName(void)
virtual void glMaterialf(GLenum face, GLenum pname, GLfloat param)
virtual void glMatrixMode(GLenum mode)
virtual void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
virtual void glTranslatef(GLfloat x, GLfloat y, GLfloat z)
virtual void glColor3fv(const GLfloat *v)
virtual void glColor4fv(const GLfloat *v)
virtual void glPushMatrix(void)
virtual void glTexCoord2d(GLdouble s, GLdouble t)
virtual void glPushName(GLuint name)
virtual void glTexParameteri(GLenum target, GLenum pname, GLint param)
virtual void glClear(GLbitfield mask)
virtual void glVertex3dv(const GLdouble *v)
virtual void glLightfv(GLenum light, GLenum pname, const GLfloat *params)
qopengl_functions(const qopengl_functions &)=default
~qopengl_functions(void)=default
qopengl_functions & operator=(const qopengl_functions &)=default
F77_RET_T const F77_DBLE * x
size_t format(std::ostream &os, const char *fmt,...)