26 #if ! defined (octave_oct_opengl_h)
27 #define octave_oct_opengl_h 1
29 #include "octave-config.h"
31 #if defined (HAVE_OPENGL)
33 # if defined (HAVE_GL_GL_H)
35 # elif defined (HAVE_OPENGL_GL_H) || defined (HAVE_FRAMEWORK_OPENGL)
36 # include <OpenGL/gl.h>
39 # if defined (HAVE_GL_GLU_H)
41 # elif defined (HAVE_OPENGL_GLU_H) || defined (HAVE_FRAMEWORK_OPENGL)
42 # include <OpenGL/glu.h>
45 # if defined (HAVE_GL_GLEXT_H)
46 # include <GL/glext.h>
47 # elif defined (HAVE_OPENGL_GLEXT_H) || defined (HAVE_FRAMEWORK_OPENGL)
48 # include <OpenGL/glext.h>
67 #if defined (HAVE_OPENGL)
75 ::glAlphaFunc (fcn, ref);
85 ::glBindTexture (target, texture);
88 virtual void glBitmap (GLsizei width, GLsizei height, GLfloat xorig,
89 GLfloat yorig, GLfloat xmove, GLfloat ymove,
90 const GLubyte *bitmap)
92 ::glBitmap (width, height, xorig, yorig, xmove, ymove, bitmap);
97 ::glBlendFunc (sfactor, dfactor);
105 virtual void glClearColor (GLclampf red, GLclampf green, GLclampf blue,
108 ::glClearColor (red, green, blue, alpha);
118 ::glClipPlane (plane, equation);
126 virtual void glColor3f (GLfloat red, GLfloat green, GLfloat blue)
128 ::glColor3f (red, green, blue);
136 virtual void glColor4d (GLdouble red, GLdouble green, GLdouble blue,
139 ::glColor4d (red, green, blue, alpha);
142 virtual void glColor4f (GLfloat red, GLfloat green, GLfloat blue,
145 ::glColor4f (red, green, blue, alpha);
155 ::glDeleteLists (list,
range);
160 ::glDeleteTextures (
n, textures);
174 GLenum type,
const GLvoid *pixels)
176 ::glDrawPixels (width, height,
format, type, pixels);
206 return ::glGenLists (
range);
211 ::glGenTextures (
n, textures);
216 ::glGetBooleanv (pname, data);
221 ::glGetDoublev (pname, data);
226 return ::glGetError ();
231 ::glGetFloatv (pname, data);
236 ::glGetIntegerv (pname, data);
241 return ::glGetString (name);
244 virtual void glHint (GLenum target, GLenum mode)
246 ::glHint (target, mode);
256 return ::glIsEnabled (cap);
259 virtual void glLightfv (GLenum light, GLenum pname,
const GLfloat *params)
261 ::glLightfv (light, pname, params);
266 ::glLineStipple (factor, pattern);
271 ::glLineWidth (width);
279 virtual void glMaterialf (GLenum face, GLenum pname, GLfloat param)
281 ::glMaterialf (face, pname, param);
284 virtual void glMaterialfv (GLenum face, GLenum pname,
const GLfloat *params)
286 ::glMaterialfv (face, pname, params);
291 ::glMatrixMode (mode);
301 ::glNewList (list, mode);
304 virtual void glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz)
306 ::glNormal3d (nx, ny, nz);
314 virtual void glOrtho (GLdouble
left, GLdouble right, GLdouble bottom,
315 GLdouble top, GLdouble near_val, GLdouble far_val)
317 ::glOrtho (
left, right, bottom, top, near_val, far_val);
322 ::glPixelStorei (pname, param);
327 ::glPixelZoom (xfactor, yfactor);
332 ::glPolygonMode (face, mode);
337 ::glPolygonOffset (factor, units);
357 ::glPushAttrib (mask);
372 ::glRasterPos3d (
x, y, z);
376 GLenum
format, GLenum type, GLvoid *pixels)
378 ::glReadPixels (
x, y, width, height,
format, type, pixels);
383 return ::glRenderMode (mode);
386 virtual void glRotated (GLdouble angle, GLdouble
x, GLdouble y, GLdouble z)
388 ::glRotated (angle,
x, y, z);
391 virtual void glScaled (GLdouble
x, GLdouble y, GLdouble z)
393 ::glScaled (
x, y, z);
398 ::glScalef (
x, y, z);
403 ::glSelectBuffer (size, buffer);
408 ::glShadeModel (mode);
413 ::glTexCoord2d (s, t);
416 virtual void glTexImage2D (GLenum target, GLint level, GLint internalFormat,
417 GLsizei width, GLsizei height, GLint border,
418 GLenum
format, GLenum type,
const GLvoid *pixels)
420 ::glTexImage2D (target, level, internalFormat, width, height, border,
426 ::glTexParameteri (target, pname, param);
431 ::glTranslated (
x, y, z);
436 ::glTranslatef (
x, y, z);
446 ::glVertex3d (
x, y, z);
454 virtual void glViewport (GLint
x, GLint y, GLsizei width, GLsizei height)
456 ::glViewport (
x, y, width, height);
virtual void glPushName(GLuint name)
virtual void glInitNames(void)
virtual GLboolean glIsEnabled(GLenum cap)
virtual void glHint(GLenum target, GLenum mode)
virtual void glGetIntegerv(GLenum pname, GLint *data)
virtual void glBegin(GLenum mode)
virtual void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
virtual void glClipPlane(GLenum plane, const GLdouble *equation)
virtual void glGetFloatv(GLenum pname, GLfloat *data)
virtual void glMatrixMode(GLenum mode)
virtual void glBindTexture(GLenum target, GLuint texture)
virtual const GLubyte * glGetString(GLenum name)
virtual GLenum glGetError(void)
virtual void glVertex2d(GLdouble x, GLdouble y)
virtual void glNewList(GLuint list, GLenum mode)
virtual void glDeleteTextures(GLsizei n, const GLuint *textures)
virtual void glVertex3d(GLdouble x, GLdouble y, GLdouble z)
virtual void glLineStipple(GLint factor, GLushort pattern)
virtual void glPopMatrix(void)
virtual void glPolygonOffset(GLfloat factor, GLfloat units)
virtual void glSelectBuffer(GLsizei size, GLuint *buffer)
virtual void glLineWidth(GLfloat width)
virtual void glColor3fv(const GLfloat *v)
virtual void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
virtual void glScalef(GLfloat x, GLfloat y, GLfloat z)
virtual void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
virtual void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
virtual void glGenTextures(GLsizei n, GLuint *textures)
virtual GLint glRenderMode(GLenum mode)
virtual void glTranslatef(GLfloat x, GLfloat y, GLfloat z)
virtual void glDisable(GLenum cap)
virtual void glCallList(GLuint list)
virtual void glTexCoord2d(GLdouble s, GLdouble t)
virtual void glDepthFunc(GLenum fcn)
virtual void glClear(GLbitfield mask)
virtual void glNormal3dv(const GLdouble *v)
virtual void glColor3f(GLfloat red, GLfloat green, GLfloat blue)
virtual void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
virtual void glVertex3dv(const GLdouble *v)
virtual void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
virtual void glAlphaFunc(GLenum fcn, GLclampf ref)
virtual void glMaterialf(GLenum face, GLenum pname, GLfloat param)
virtual void glLoadIdentity(void)
virtual void glPolygonMode(GLenum face, GLenum mode)
virtual void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
virtual void glColor3dv(const GLdouble *v)
virtual ~opengl_functions(void)=default
virtual GLuint glGenLists(GLsizei range)
virtual void glDeleteLists(GLuint list, GLsizei range)
virtual void glColor4fv(const GLfloat *v)
virtual void glTexParameteri(GLenum target, GLenum pname, GLint param)
virtual void glEnable(GLenum cap)
virtual void glGetBooleanv(GLenum pname, GLboolean *data)
virtual void glBlendFunc(GLenum sfactor, GLenum dfactor)
virtual void glShadeModel(GLenum mode)
virtual void glEdgeFlag(GLboolean flag)
virtual void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val)
virtual void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
virtual void glEndList(void)
virtual void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
virtual void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
virtual void glGetDoublev(GLenum pname, GLdouble *data)
virtual void glPushAttrib(GLbitfield mask)
virtual void glMultMatrixd(const GLdouble *m)
virtual void glPixelStorei(GLenum pname, GLint param)
virtual void glPushMatrix(void)
virtual void glScaled(GLdouble x, GLdouble y, GLdouble z)
virtual void glPopName(void)
opengl_functions(const opengl_functions &)=default
virtual void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
virtual void glLightfv(GLenum light, GLenum pname, const GLfloat *params)
virtual void glTranslated(GLdouble x, GLdouble y, GLdouble z)
virtual void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
virtual void glPixelZoom(GLfloat xfactor, GLfloat yfactor)
virtual void glFinish(void)
virtual void glPopAttrib(void)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
F77_RET_T const F77_DBLE * x
std::size_t format(std::ostream &os, const char *fmt,...)