home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
newopg.zip
/
GLU.H
< prev
next >
Wrap
Text File
|
1995-03-04
|
13KB
|
270 lines
/* @(#)68 1.3 src/gos/3d/OPENGL/include/GL/glu.h, glxlib, gos410 4/2/93 07:01:03 */
/*
* COMPONENT_NAME: GLXLIB
*
* FUNCTIONS:
*
* ORIGINS: 21,27
*
*
* (C) COPYRIGHT International Business Machines Corp. 1992
* All Rights Reserved
* Licensed Materials - Property of IBM
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
#ifndef __glu_h__
#define __glu_h__
#include <gl.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
** Return the error string associated with a particular error code.
** This will return 0 for an invalid error code.
*/
#ifndef OS2
extern const GLubyte* APIENTRY gluErrorString (GLenum errorCode);
extern void APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
extern void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
extern void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4]);
extern void APIENTRY gluLookAt (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz);
extern int APIENTRY gluProject (GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz);
extern int APIENTRY gluUnProject (GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz);
extern int APIENTRY gluScaleImage (GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain, GLint widthout, GLint heightout, GLenum typeout, void *dataout);
extern int APIENTRY gluBuild1DMipmaps (GLenum target, GLint components, GLint width, GLenum format, GLenum type, const void *data);
extern int APIENTRY gluBuild2DMipmaps (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data);
typedef struct GLUquadricObj GLUquadricObj;
extern GLUquadricObj* APIENTRY gluNewQuadric (void);
extern void APIENTRY gluDeleteQuadric (GLUquadricObj *state);
extern void APIENTRY gluQuadricNormals (GLUquadricObj *qobj, GLenum normals);
extern void APIENTRY gluQuadricTexture (GLUquadricObj *qobj, GLboolean textureCoords);
extern void APIENTRY gluQuadricOrientation (GLUquadricObj *qobj, GLenum orientation);
extern void APIENTRY gluQuadricDrawStyle (GLUquadricObj *qobj, GLenum drawStyle);
extern void APIENTRY gluCylinder (GLUquadricObj *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks);
extern void APIENTRY gluDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops);
extern void APIENTRY gluPartialDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle);
extern void APIENTRY gluSphere (GLUquadricObj *qobj, GLdouble radius, GLint slices, GLint stacks);
extern void APIENTRY gluQuadricCallback (GLUquadricObj *qobj, GLenum which, void (*fn)());
typedef struct GLUtriangulatorObj GLUtriangulatorObj;
extern GLUtriangulatorObj* APIENTRY gluNewTess (void);
extern void APIENTRY gluTessCallback (GLUtriangulatorObj *tobj, GLenum which, void (*fn)());
extern void APIENTRY gluDeleteTess (GLUtriangulatorObj *tobj);
extern void APIENTRY gluBeginPolygon (GLUtriangulatorObj *tobj);
extern void APIENTRY gluEndPolygon (GLUtriangulatorObj *tobj);
extern void APIENTRY gluNextContour (GLUtriangulatorObj *tobj, GLenum type);
extern void APIENTRY gluTessVertex (GLUtriangulatorObj *tobj, GLdouble v[3], void *data);
#ifdef __cplusplus
class GLUnurbsObj;
#else
typedef struct GLUnurbsObj GLUnurbsObj;
#endif
extern GLUnurbsObj* APIENTRY gluNewNurbsRenderer (void);
extern void APIENTRY gluDeleteNurbsRenderer (GLUnurbsObj *nobj);
extern void APIENTRY gluBeginSurface (GLUnurbsObj *nobj);
extern void APIENTRY gluBeginCurve (GLUnurbsObj *nobj);
extern void APIENTRY gluEndCurve (GLUnurbsObj *nobj);
extern void APIENTRY gluEndSurface (GLUnurbsObj *nobj);
extern void APIENTRY gluBeginTrim (GLUnurbsObj *nobj);
extern void APIENTRY gluEndTrim (GLUnurbsObj *nobj);
extern void APIENTRY gluPwlCurve (GLUnurbsObj *nobj, GLint count, GLfloat *array, GLint stride, GLenum type);
extern void APIENTRY gluNurbsCurve (GLUnurbsObj *nobj, GLint nknots, GLfloat *knot, GLint stride, GLfloat *ctlarray, GLint order, GLenum type);
extern void APIENTRY gluNurbsSurface (GLUnurbsObj *nobj, GLint uknot_count, GLfloat *uknot, GLint vknot_count, GLfloat *vknot, GLint u_stride, GLint v_stride, GLfloat *ctlarray, GLint uorder, GLint vorder, GLenum type);
extern void APIENTRY gluLoadSamplingMatrices (GLUnurbsObj *nobj, const GLfloat modelMatrix[16], const GLfloat projMatrix[16], const GLint viewport[4]);
extern void APIENTRY gluNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat value);
extern void APIENTRY gluGetNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat *value);
extern void APIENTRY gluNurbsCallback (GLUnurbsObj *nobj, GLenum which, void (*fn)());
#else
extern const GLubyte* APIENTRY gluErrorString (GLenum errorCode);
extern void APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
extern void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
extern void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4]);
extern void APIENTRY gluLookAt (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz);
extern int APIENTRY gluProject (GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz);
extern int APIENTRY gluUnProject (GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz);
extern int APIENTRY gluScaleImage (GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain, GLint widthout, GLint heightout, GLenum typeout, void *dataout);
extern int APIENTRY gluBuild1DMipmaps (GLenum target, GLint components, GLint width, GLenum format, GLenum type, const void *data);
extern int APIENTRY gluBuild2DMipmaps (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data);
typedef struct GLUquadricObj GLUquadricObj;
extern GLUquadricObj* APIENTRY gluNewQuadric (void);
extern void APIENTRY gluDeleteQuadric (GLUquadricObj *state);
extern void APIENTRY gluQuadricNormals (GLUquadricObj *qobj, GLenum normals);
extern void APIENTRY gluQuadricTexture (GLUquadricObj *qobj, GLboolean textureCoords);
extern void APIENTRY gluQuadricOrientation (GLUquadricObj *qobj, GLenum orientation);
extern void APIENTRY gluQuadricDrawStyle (GLUquadricObj *qobj, GLenum drawStyle);
extern void APIENTRY gluCylinder (GLUquadricObj *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks);
extern void APIENTRY gluDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops);
extern void APIENTRY gluPartialDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle);
extern void APIENTRY gluSphere (GLUquadricObj *qobj, GLdouble radius, GLint slices, GLint stacks);
extern void APIENTRY gluQuadricCallback (GLUquadricObj *qobj, GLenum which, void (*fn)());
typedef struct GLUtriangulatorObj GLUtriangulatorObj;
extern GLUtriangulatorObj* APIENTRY gluNewTess (void);
extern void APIENTRY gluTessCallback (GLUtriangulatorObj *tobj, GLenum which, void (*fn)());
extern void APIENTRY gluDeleteTess (GLUtriangulatorObj *tobj);
extern void APIENTRY gluBeginPolygon (GLUtriangulatorObj *tobj);
extern void APIENTRY gluEndPolygon (GLUtriangulatorObj *tobj);
extern void APIENTRY gluNextContour (GLUtriangulatorObj *tobj, GLenum type);
extern void APIENTRY gluTessVertex (GLUtriangulatorObj *tobj, GLdouble v[3], void *data);
#ifdef __cplusplus
class GLUnurbsObj;
#else
typedef struct GLUnurbsObj GLUnurbsObj;
#endif
extern GLUnurbsObj* APIENTRY gluNewNurbsRenderer (void);
extern void APIENTRY gluDeleteNurbsRenderer (GLUnurbsObj *nobj);
extern void APIENTRY gluBeginSurface (GLUnurbsObj *nobj);
extern void APIENTRY gluBeginCurve (GLUnurbsObj *nobj);
extern void APIENTRY gluEndCurve (GLUnurbsObj *nobj);
extern void APIENTRY gluEndSurface (GLUnurbsObj *nobj);
extern void APIENTRY gluBeginTrim (GLUnurbsObj *nobj);
extern void APIENTRY gluEndTrim (GLUnurbsObj *nobj);
extern void APIENTRY gluPwlCurve (GLUnurbsObj *nobj, GLint count, GLfloat *array, GLint stride, GLenum type);
extern void APIENTRY gluNurbsCurve (GLUnurbsObj *nobj, GLint nknots, GLfloat *knot, GLint stride, GLfloat *ctlarray, GLint order, GLenum type);
extern void APIENTRY gluNurbsSurface (GLUnurbsObj *nobj, GLint uknot_count, GLfloat *uknot, GLint vknot_count, GLfloat *vknot, GLint u_stride, GLint v_stride, GLfloat *ctlarray, GLint uorder, GLint vorder, GLenum type);
extern void APIENTRY gluLoadSamplingMatrices (GLUnurbsObj *nobj, const GLfloat modelMatrix[16], const GLfloat projMatrix[16], const GLint viewport[4]);
extern void APIENTRY gluNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat value);
extern void APIENTRY gluGetNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat *value);
extern void APIENTRY gluNurbsCallback (GLUnurbsObj *nobj, GLenum which, void (*fn)());
#endif
/**** Generic constants ****/
/* Errors: (return value 0 = no error) */
#define GLU_INVALID_ENUM 100900
#define GLU_INVALID_VALUE 100901
#define GLU_OUT_OF_MEMORY 100902
/* For laughs: */
#define GLU_TRUE GL_TRUE
#define GLU_FALSE GL_FALSE
/**** Quadric constants ****/
/* Types of normals: */
#define GLU_SMOOTH 100000
#define GLU_FLAT 100001
#define GLU_NONE 100002
/* DrawStyle types: */
#define GLU_POINT 100010
#define GLU_LINE 100011
#define GLU_FILL 100012
#define GLU_SILHOUETTE 100013
/* Orientation types: */
#define GLU_OUTSIDE 100020
#define GLU_INSIDE 100021
/* Callback types: */
/* GLU_ERROR 100103 */
/**** Tesselation constants ****/
/* Callback types: */
#define GLU_BEGIN 100100 /* void (*)(GLenum) */
#define GLU_VERTEX 100101 /* void (*)(void *) */
#define GLU_END 100102 /* void (*)(void) */
#define GLU_ERROR 100103 /* void (*)(GLint) */
#define GLU_EDGE_FLAG 100104 /* void (*)(GLboolean) */
/* Contours types: */
#define GLU_CW 100120
#define GLU_CCW 100121
#define GLU_INTERIOR 100122
#define GLU_EXTERIOR 100123
#define GLU_UNKNOWN 100124
#define GLU_TESS_ERROR1 100151
#define GLU_TESS_ERROR2 100152
#define GLU_TESS_ERROR3 100153
#define GLU_TESS_ERROR4 100154
#define GLU_TESS_ERROR5 100155
#define GLU_TESS_ERROR6 100156
#define GLU_TESS_ERROR7 100157
#define GLU_TESS_ERROR8 100158
/**** NURBS constants ****/
/* Properties: */
#define GLU_AUTO_LOAD_MATRIX 100200
#define GLU_CULLING 100201
#define GLU_SAMPLING_TOLERANCE 100203
#define GLU_DISPLAY_MODE 100204
/* Trimming curve types */
#define GLU_MAP1_TRIM_2 100210
#define GLU_MAP1_TRIM_3 100211
/* Display modes: */
/* GLU_FILL 100012 */
#define GLU_OUTLINE_POLYGON 100240
#define GLU_OUTLINE_PATCH 100241
/* Callbacks: */
/* GLU_ERROR 100103 */
/* Errors: */
#define GLU_NURBS_ERROR1 100251
#define GLU_NURBS_ERROR2 100252
#define GLU_NURBS_ERROR3 100253
#define GLU_NURBS_ERROR4 100254
#define GLU_NURBS_ERROR5 100255
#define GLU_NURBS_ERROR6 100256
#define GLU_NURBS_ERROR7 100257
#define GLU_NURBS_ERROR8 100258
#define GLU_NURBS_ERROR9 100259
#define GLU_NURBS_ERROR10 100260
#define GLU_NURBS_ERROR11 100261
#define GLU_NURBS_ERROR12 100262
#define GLU_NURBS_ERROR13 100263
#define GLU_NURBS_ERROR14 100264
#define GLU_NURBS_ERROR15 100265
#define GLU_NURBS_ERROR16 100266
#define GLU_NURBS_ERROR17 100267
#define GLU_NURBS_ERROR18 100268
#define GLU_NURBS_ERROR19 100269
#define GLU_NURBS_ERROR20 100270
#define GLU_NURBS_ERROR21 100271
#define GLU_NURBS_ERROR22 100272
#define GLU_NURBS_ERROR23 100273
#define GLU_NURBS_ERROR24 100274
#define GLU_NURBS_ERROR25 100275
#define GLU_NURBS_ERROR26 100276
#define GLU_NURBS_ERROR27 100277
#define GLU_NURBS_ERROR28 100278
#define GLU_NURBS_ERROR29 100279
#define GLU_NURBS_ERROR30 100280
#define GLU_NURBS_ERROR31 100281
#define GLU_NURBS_ERROR32 100282
#define GLU_NURBS_ERROR33 100283
#define GLU_NURBS_ERROR34 100284
#define GLU_NURBS_ERROR35 100285
#define GLU_NURBS_ERROR36 100286
#define GLU_NURBS_ERROR37 100287
#ifdef __cplusplus
}
#endif
#endif /* __glu_h__ */