1 /*---------------------------------------------------------------------------- 2 3 glsu.h - This is the GLU include file for the gls library. 4 5 See gls.h or http://www.glsetup.com/dev/gls.htm for more information 6 and to report bugs. 7 8 Copyright 1999 GLSetup Incorporated, All Rights Reserved. 9 10 You have permission to use this code in your applications, commercial 11 or otherwise. If you distribute source code with your application, 12 this file must not be modified. Please don't mirror these files; 13 instead, link to the URL above. 14 15 Version 1.0.0.2 Beta 16 Created 8-23-99 17 18 */ 19 20 #ifndef GLSU_H 21 22 #ifndef GLS_NO_GLU 23 24 #ifndef GLS_H 25 #include "gls.h" 26 #endif 27 28 29 /* 30 ** Copyright 1991-1993, Silicon Graphics, Inc. 31 ** All Rights Reserved. 32 ** 33 ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.; 34 ** the contents of this file may not be disclosed to third parties, copied or 35 ** duplicated in any form, in whole or in part, without the prior written 36 ** permission of Silicon Graphics, Inc. 37 ** 38 ** RESTRICTED RIGHTS LEGEND: 39 ** Use, duplication or disclosure by the Government is subject to restrictions 40 ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data 41 ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or 42 ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - 43 ** rights reserved under the Copyright Laws of the United States. 44 */ 45 46 #ifdef __cplusplus 47 extern "C" { 48 #endif 49 50 51 /*************************************************************/ 52 53 /* Boolean */ 54 #define GLU_FALSE 0 55 #define GLU_TRUE 1 56 57 /* Version */ 58 #define GLU_VERSION_1_1 1 59 #define GLU_VERSION_1_2 1 60 61 /* StringName */ 62 #define GLU_VERSION 100800 63 #define GLU_EXTENSIONS 100801 64 65 /* ErrorCode */ 66 #define GLU_INVALID_ENUM 100900 67 #define GLU_INVALID_VALUE 100901 68 #define GLU_OUT_OF_MEMORY 100902 69 #define GLU_INCOMPATIBLE_GL_VERSION 100903 70 #define GLU_INVALID_OPERATION 100904 71 72 /* NurbsDisplay */ 73 /* GLU_FILL */ 74 #define GLU_OUTLINE_POLYGON 100240 75 #define GLU_OUTLINE_PATCH 100241 76 77 /* NurbsCallback */ 78 #define GLU_ERROR 100103 79 80 /* NurbsError */ 81 #define GLU_NURBS_ERROR1 100251 82 #define GLU_NURBS_ERROR2 100252 83 #define GLU_NURBS_ERROR3 100253 84 #define GLU_NURBS_ERROR4 100254 85 #define GLU_NURBS_ERROR5 100255 86 #define GLU_NURBS_ERROR6 100256 87 #define GLU_NURBS_ERROR7 100257 88 #define GLU_NURBS_ERROR8 100258 89 #define GLU_NURBS_ERROR9 100259 90 #define GLU_NURBS_ERROR10 100260 91 #define GLU_NURBS_ERROR11 100261 92 #define GLU_NURBS_ERROR12 100262 93 #define GLU_NURBS_ERROR13 100263 94 #define GLU_NURBS_ERROR14 100264 95 #define GLU_NURBS_ERROR15 100265 96 #define GLU_NURBS_ERROR16 100266 97 #define GLU_NURBS_ERROR17 100267 98 #define GLU_NURBS_ERROR18 100268 99 #define GLU_NURBS_ERROR19 100269 100 #define GLU_NURBS_ERROR20 100270 101 #define GLU_NURBS_ERROR21 100271 102 #define GLU_NURBS_ERROR22 100272 103 #define GLU_NURBS_ERROR23 100273 104 #define GLU_NURBS_ERROR24 100274 105 #define GLU_NURBS_ERROR25 100275 106 #define GLU_NURBS_ERROR26 100276 107 #define GLU_NURBS_ERROR27 100277 108 #define GLU_NURBS_ERROR28 100278 109 #define GLU_NURBS_ERROR29 100279 110 #define GLU_NURBS_ERROR30 100280 111 #define GLU_NURBS_ERROR31 100281 112 #define GLU_NURBS_ERROR32 100282 113 #define GLU_NURBS_ERROR33 100283 114 #define GLU_NURBS_ERROR34 100284 115 #define GLU_NURBS_ERROR35 100285 116 #define GLU_NURBS_ERROR36 100286 117 #define GLU_NURBS_ERROR37 100287 118 119 /* NurbsProperty */ 120 #define GLU_AUTO_LOAD_MATRIX 100200 121 #define GLU_CULLING 100201 122 #define GLU_SAMPLING_TOLERANCE 100203 123 #define GLU_DISPLAY_MODE 100204 124 #define GLU_PARAMETRIC_TOLERANCE 100202 125 #define GLU_SAMPLING_METHOD 100205 126 #define GLU_U_STEP 100206 127 #define GLU_V_STEP 100207 128 129 /* NurbsSampling */ 130 #define GLU_PATH_LENGTH 100215 131 #define GLU_PARAMETRIC_ERROR 100216 132 #define GLU_DOMAIN_DISTANCE 100217 133 134 /* NurbsTrim */ 135 #define GLU_MAP1_TRIM_2 100210 136 #define GLU_MAP1_TRIM_3 100211 137 138 /* QuadricDrawStyle */ 139 #define GLU_POINT 100010 140 #define GLU_LINE 100011 141 #define GLU_FILL 100012 142 #define GLU_SILHOUETTE 100013 143 144 /* QuadricCallback */ 145 /* GLU_ERROR */ 146 147 /* QuadricNormal */ 148 #define GLU_SMOOTH 100000 149 #define GLU_FLAT 100001 150 #define GLU_NONE 100002 151 152 /* QuadricOrientation */ 153 #define GLU_OUTSIDE 100020 154 #define GLU_INSIDE 100021 155 156 /* TessCallback */ 157 #define GLU_TESS_BEGIN 100100 158 #define GLU_BEGIN 100100 159 #define GLU_TESS_VERTEX 100101 160 #define GLU_VERTEX 100101 161 #define GLU_TESS_END 100102 162 #define GLU_END 100102 163 #define GLU_TESS_ERROR 100103 164 #define GLU_TESS_EDGE_FLAG 100104 165 #define GLU_EDGE_FLAG 100104 166 #define GLU_TESS_COMBINE 100105 167 #define GLU_TESS_BEGIN_DATA 100106 168 #define GLU_TESS_VERTEX_DATA 100107 169 #define GLU_TESS_END_DATA 100108 170 #define GLU_TESS_ERROR_DATA 100109 171 #define GLU_TESS_EDGE_FLAG_DATA 100110 172 #define GLU_TESS_COMBINE_DATA 100111 173 174 /* TessContour */ 175 #define GLU_CW 100120 176 #define GLU_CCW 100121 177 #define GLU_INTERIOR 100122 178 #define GLU_EXTERIOR 100123 179 #define GLU_UNKNOWN 100124 180 181 /* TessProperty */ 182 #define GLU_TESS_WINDING_RULE 100140 183 #define GLU_TESS_BOUNDARY_ONLY 100141 184 #define GLU_TESS_TOLERANCE 100142 185 186 /* TessError */ 187 #define GLU_TESS_ERROR1 100151 188 #define GLU_TESS_ERROR2 100152 189 #define GLU_TESS_ERROR3 100153 190 #define GLU_TESS_ERROR4 100154 191 #define GLU_TESS_ERROR5 100155 192 #define GLU_TESS_ERROR6 100156 193 #define GLU_TESS_ERROR7 100157 194 #define GLU_TESS_ERROR8 100158 195 #define GLU_TESS_MISSING_BEGIN_POLYGON 100151 196 #define GLU_TESS_MISSING_BEGIN_CONTOUR 100152 197 #define GLU_TESS_MISSING_END_POLYGON 100153 198 #define GLU_TESS_MISSING_END_CONTOUR 100154 199 #define GLU_TESS_COORD_TOO_LARGE 100155 200 #define GLU_TESS_NEED_COMBINE_CALLBACK 100156 201 202 /* TessWinding */ 203 #define GLU_TESS_WINDING_ODD 100130 204 #define GLU_TESS_WINDING_NONZERO 100131 205 #define GLU_TESS_WINDING_POSITIVE 100132 206 #define GLU_TESS_WINDING_NEGATIVE 100133 207 #define GLU_TESS_WINDING_ABS_GEQ_TWO 100134 208 209 /*************************************************************/ 210 211 212 #ifdef __cplusplus 213 214 class GLUnurbs; 215 class GLUquadric; 216 class GLUtesselator; 217 218 typedef class GLUnurbs GLUnurbsObj; 219 typedef class GLUquadric GLUquadricObj; 220 typedef class GLUtesselator GLUtesselatorObj; 221 typedef class GLUtesselator GLUtriangulatorObj; 222 223 #else 224 225 typedef struct GLUnurbs GLUnurbs; 226 typedef struct GLUquadric GLUquadric; 227 typedef struct GLUtesselator GLUtesselator; 228 229 typedef struct GLUnurbs GLUnurbsObj; 230 typedef struct GLUquadric GLUquadricObj; 231 typedef struct GLUtesselator GLUtesselatorObj; 232 typedef struct GLUtesselator GLUtriangulatorObj; 233 234 #endif 235 236 #define GLU_TESS_MAX_COORD 1.0e150 237 238 extern void ( APIENTRY * GLS_CONST gluBeginCurve ) (GLUnurbs* nurb); 239 extern void ( APIENTRY * GLS_CONST gluBeginPolygon ) (GLUtesselator* tess); 240 extern void ( APIENTRY * GLS_CONST gluBeginSurface ) (GLUnurbs* nurb); 241 extern void ( APIENTRY * GLS_CONST gluBeginTrim ) (GLUnurbs* nurb); 242 extern GLint ( APIENTRY * GLS_CONST gluBuild1DMipmaps ) (GLenum target, GLint component, GLsizei width, GLenum format, GLenum type, const void *data); 243 extern GLint ( APIENTRY * GLS_CONST gluBuild2DMipmaps ) (GLenum target, GLint component, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data); 244 extern void ( APIENTRY * GLS_CONST gluCylinder ) (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); 245 extern void ( APIENTRY * GLS_CONST gluDeleteNurbsRenderer ) (GLUnurbs* nurb); 246 extern void ( APIENTRY * GLS_CONST gluDeleteQuadric ) (GLUquadric* quad); 247 extern void ( APIENTRY * GLS_CONST gluDeleteTess ) (GLUtesselator* tess); 248 extern void ( APIENTRY * GLS_CONST gluDisk ) (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); 249 extern void ( APIENTRY * GLS_CONST gluEndCurve ) (GLUnurbs* nurb); 250 extern void ( APIENTRY * GLS_CONST gluEndPolygon ) (GLUtesselator* tess); 251 extern void ( APIENTRY * GLS_CONST gluEndSurface ) (GLUnurbs* nurb); 252 extern void ( APIENTRY * GLS_CONST gluEndTrim ) (GLUnurbs* nurb); 253 extern const GLubyte * ( APIENTRY * GLS_CONST gluErrorString ) (GLenum error); 254 extern void ( APIENTRY * GLS_CONST gluGetNurbsProperty ) (GLUnurbs* nurb, GLenum property, GLfloat* data); 255 extern const GLubyte * ( APIENTRY * GLS_CONST gluGetString ) (GLenum name); 256 extern void ( APIENTRY * GLS_CONST gluGetTessProperty ) (GLUtesselator* tess, GLenum which, GLdouble* data); 257 extern void ( APIENTRY * GLS_CONST gluLoadSamplingMatrices ) (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view); 258 extern void ( APIENTRY * GLS_CONST gluLookAt ) (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); 259 extern GLUnurbs* ( APIENTRY * GLS_CONST gluNewNurbsRenderer ) (void); 260 extern GLUquadric* ( APIENTRY * GLS_CONST gluNewQuadric ) (void); 261 extern GLUtesselator* ( APIENTRY * GLS_CONST gluNewTess ) (void); 262 extern void ( APIENTRY * GLS_CONST gluNextContour ) (GLUtesselator* tess, GLenum type); 263 extern void ( APIENTRY * GLS_CONST gluNurbsCallback ) (GLUnurbs* nurb, GLenum which, GLvoid (CALLBACK *CallBackFunc)()); 264 extern void ( APIENTRY * GLS_CONST gluNurbsCurve ) (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type); 265 extern void ( APIENTRY * GLS_CONST gluNurbsProperty ) (GLUnurbs* nurb, GLenum property, GLfloat value); 266 extern void ( APIENTRY * GLS_CONST gluNurbsSurface ) (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type); 267 extern void ( APIENTRY * GLS_CONST gluOrtho2D ) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); 268 extern void ( APIENTRY * GLS_CONST gluPartialDisk ) (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); 269 extern void ( APIENTRY * GLS_CONST gluPerspective ) (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); 270 extern void ( APIENTRY * GLS_CONST gluPickMatrix ) (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport); 271 extern GLint ( APIENTRY * GLS_CONST gluProject ) (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); 272 extern void ( APIENTRY * GLS_CONST gluPwlCurve ) (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type); 273 extern void ( APIENTRY * GLS_CONST gluQuadricCallback ) (GLUquadric* quad, GLenum which, GLvoid (CALLBACK *CallBackFunc)()); 274 extern void ( APIENTRY * GLS_CONST gluQuadricDrawStyle ) (GLUquadric* quad, GLenum draw); 275 extern void ( APIENTRY * GLS_CONST gluQuadricNormals ) (GLUquadric* quad, GLenum normal); 276 extern void ( APIENTRY * GLS_CONST gluQuadricOrientation ) (GLUquadric* quad, GLenum orientation); 277 extern void ( APIENTRY * GLS_CONST gluQuadricTexture ) (GLUquadric* quad, GLboolean texture); 278 extern GLint ( APIENTRY * GLS_CONST gluScaleImage ) (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); 279 extern void ( APIENTRY * GLS_CONST gluSphere ) (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks); 280 extern void ( APIENTRY * GLS_CONST gluTessBeginContour ) (GLUtesselator* tess); 281 extern void ( APIENTRY * GLS_CONST gluTessBeginPolygon ) (GLUtesselator* tess, GLvoid* data); 282 extern void ( APIENTRY * GLS_CONST gluTessCallback ) (GLUtesselator* tess, GLenum which, GLvoid (CALLBACK *CallBackFunc)()); 283 extern void ( APIENTRY * GLS_CONST gluTessEndContour ) (GLUtesselator* tess); 284 extern void ( APIENTRY * GLS_CONST gluTessEndPolygon ) (GLUtesselator* tess); 285 extern void ( APIENTRY * GLS_CONST gluTessNormal ) (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); 286 extern void ( APIENTRY * GLS_CONST gluTessProperty ) (GLUtesselator* tess, GLenum which, GLdouble data); 287 extern void ( APIENTRY * GLS_CONST gluTessVertex ) (GLUtesselator* tess, GLdouble *location, GLvoid* data); 288 extern GLint ( APIENTRY * GLS_CONST gluUnProject ) (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ); 289 290 #ifdef __cplusplus 291 } 292 #endif 293 294 #endif /* GLS_NO_GLU */ 295 296 #define GLSU_H 297 #endif 298