Embed:
(wiki syntax)
Show/hide line numbers
glu.h
00001 /* 00002 ** License Applicability. Except to the extent portions of this file are 00003 ** made subject to an alternative license as permitted in the SGI Free 00004 ** Software License B, Version 1.1 (the "License"), the contents of this 00005 ** file are subject only to the provisions of the License. You may not use 00006 ** this file except in compliance with the License. You may obtain a copy 00007 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 00008 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: 00009 ** 00010 ** http://oss.sgi.com/projects/FreeB 00011 ** 00012 ** Note that, as provided in the License, the Software is distributed on an 00013 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS 00014 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND 00015 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A 00016 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. 00017 ** 00018 ** Original Code. The Original Code is: OpenGL Sample Implementation, 00019 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, 00020 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. 00021 ** Copyright in any portions created by third parties is as indicated 00022 ** elsewhere herein. All Rights Reserved. 00023 ** 00024 ** Additional Notice Provisions: This software was created using the 00025 ** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has 00026 ** not been independently verified as being compliant with the OpenGL(R) 00027 ** version 1.2.1 Specification. 00028 */ 00029 00030 #ifndef __glu_h__ 00031 #define __glu_h__ 00032 #define _GLU_H 00033 #if __GNUC__ >= 3 00034 #pragma GCC system_header 00035 #endif 00036 00037 #include <stddef.h> /* for wchar_t */ 00038 #include <GL/gl.h> 00039 00040 #ifdef __cplusplus 00041 extern "C" { 00042 #endif 00043 00044 /*************************************************************/ 00045 00046 /* Boolean */ 00047 #define GLU_FALSE 0 00048 #define GLU_TRUE 1 00049 00050 /* Version */ 00051 #define GLU_VERSION_1_1 1 00052 #define GLU_VERSION_1_2 1 00053 00054 /* StringName */ 00055 #define GLU_VERSION 100800 00056 #define GLU_EXTENSIONS 100801 00057 00058 /* ErrorCode */ 00059 #define GLU_INVALID_ENUM 100900 00060 #define GLU_INVALID_VALUE 100901 00061 #define GLU_OUT_OF_MEMORY 100902 00062 #define GLU_INVALID_OPERATION 100904 00063 00064 /* NurbsDisplay */ 00065 /* GLU_FILL */ 00066 #define GLU_OUTLINE_POLYGON 100240 00067 #define GLU_OUTLINE_PATCH 100241 00068 00069 /* NurbsError */ 00070 #define GLU_NURBS_ERROR1 100251 00071 #define GLU_NURBS_ERROR2 100252 00072 #define GLU_NURBS_ERROR3 100253 00073 #define GLU_NURBS_ERROR4 100254 00074 #define GLU_NURBS_ERROR5 100255 00075 #define GLU_NURBS_ERROR6 100256 00076 #define GLU_NURBS_ERROR7 100257 00077 #define GLU_NURBS_ERROR8 100258 00078 #define GLU_NURBS_ERROR9 100259 00079 #define GLU_NURBS_ERROR10 100260 00080 #define GLU_NURBS_ERROR11 100261 00081 #define GLU_NURBS_ERROR12 100262 00082 #define GLU_NURBS_ERROR13 100263 00083 #define GLU_NURBS_ERROR14 100264 00084 #define GLU_NURBS_ERROR15 100265 00085 #define GLU_NURBS_ERROR16 100266 00086 #define GLU_NURBS_ERROR17 100267 00087 #define GLU_NURBS_ERROR18 100268 00088 #define GLU_NURBS_ERROR19 100269 00089 #define GLU_NURBS_ERROR20 100270 00090 #define GLU_NURBS_ERROR21 100271 00091 #define GLU_NURBS_ERROR22 100272 00092 #define GLU_NURBS_ERROR23 100273 00093 #define GLU_NURBS_ERROR24 100274 00094 #define GLU_NURBS_ERROR25 100275 00095 #define GLU_NURBS_ERROR26 100276 00096 #define GLU_NURBS_ERROR27 100277 00097 #define GLU_NURBS_ERROR28 100278 00098 #define GLU_NURBS_ERROR29 100279 00099 #define GLU_NURBS_ERROR30 100280 00100 #define GLU_NURBS_ERROR31 100281 00101 #define GLU_NURBS_ERROR32 100282 00102 #define GLU_NURBS_ERROR33 100283 00103 #define GLU_NURBS_ERROR34 100284 00104 #define GLU_NURBS_ERROR35 100285 00105 #define GLU_NURBS_ERROR36 100286 00106 #define GLU_NURBS_ERROR37 100287 00107 00108 /* NurbsProperty */ 00109 #define GLU_AUTO_LOAD_MATRIX 100200 00110 #define GLU_CULLING 100201 00111 #define GLU_SAMPLING_TOLERANCE 100203 00112 #define GLU_DISPLAY_MODE 100204 00113 #define GLU_PARAMETRIC_TOLERANCE 100202 00114 #define GLU_SAMPLING_METHOD 100205 00115 #define GLU_U_STEP 100206 00116 #define GLU_V_STEP 100207 00117 00118 /* NurbsSampling */ 00119 #define GLU_PATH_LENGTH 100215 00120 #define GLU_PARAMETRIC_ERROR 100216 00121 #define GLU_DOMAIN_DISTANCE 100217 00122 00123 /* NurbsTrim */ 00124 #define GLU_MAP1_TRIM_2 100210 00125 #define GLU_MAP1_TRIM_3 100211 00126 00127 /* QuadricDrawStyle */ 00128 #define GLU_POINT 100010 00129 #define GLU_LINE 100011 00130 #define GLU_FILL 100012 00131 #define GLU_SILHOUETTE 100013 00132 00133 /* QuadricCallback */ 00134 #define GLU_ERROR 100103 00135 00136 /* QuadricNormal */ 00137 #define GLU_SMOOTH 100000 00138 #define GLU_FLAT 100001 00139 #define GLU_NONE 100002 00140 00141 /* QuadricOrientation */ 00142 #define GLU_OUTSIDE 100020 00143 #define GLU_INSIDE 100021 00144 00145 /* TessCallback */ 00146 #define GLU_TESS_BEGIN 100100 00147 #define GLU_BEGIN 100100 00148 #define GLU_TESS_VERTEX 100101 00149 #define GLU_VERTEX 100101 00150 #define GLU_TESS_END 100102 00151 #define GLU_END 100102 00152 #define GLU_TESS_ERROR 100103 00153 #define GLU_TESS_EDGE_FLAG 100104 00154 #define GLU_EDGE_FLAG 100104 00155 #define GLU_TESS_COMBINE 100105 00156 #define GLU_TESS_BEGIN_DATA 100106 00157 #define GLU_TESS_VERTEX_DATA 100107 00158 #define GLU_TESS_END_DATA 100108 00159 #define GLU_TESS_ERROR_DATA 100109 00160 #define GLU_TESS_EDGE_FLAG_DATA 100110 00161 #define GLU_TESS_COMBINE_DATA 100111 00162 00163 /* TessContour */ 00164 #define GLU_CW 100120 00165 #define GLU_CCW 100121 00166 #define GLU_INTERIOR 100122 00167 #define GLU_EXTERIOR 100123 00168 #define GLU_UNKNOWN 100124 00169 00170 /* TessProperty */ 00171 #define GLU_TESS_WINDING_RULE 100140 00172 #define GLU_TESS_BOUNDARY_ONLY 100141 00173 #define GLU_TESS_TOLERANCE 100142 00174 00175 /* TessError */ 00176 #define GLU_TESS_ERROR1 100151 00177 #define GLU_TESS_ERROR2 100152 00178 #define GLU_TESS_ERROR3 100153 00179 #define GLU_TESS_ERROR4 100154 00180 #define GLU_TESS_ERROR5 100155 00181 #define GLU_TESS_ERROR6 100156 00182 #define GLU_TESS_ERROR7 100157 00183 #define GLU_TESS_ERROR8 100158 00184 #define GLU_TESS_MISSING_BEGIN_POLYGON 100151 00185 #define GLU_TESS_MISSING_BEGIN_CONTOUR 100152 00186 #define GLU_TESS_MISSING_END_POLYGON 100153 00187 #define GLU_TESS_MISSING_END_CONTOUR 100154 00188 #define GLU_TESS_COORD_TOO_LARGE 100155 00189 #define GLU_TESS_NEED_COMBINE_CALLBACK 100156 00190 00191 /* TessWinding */ 00192 #define GLU_TESS_WINDING_ODD 100130 00193 #define GLU_TESS_WINDING_NONZERO 100131 00194 #define GLU_TESS_WINDING_POSITIVE 100132 00195 #define GLU_TESS_WINDING_NEGATIVE 100133 00196 #define GLU_TESS_WINDING_ABS_GEQ_TWO 100134 00197 00198 /* Obsolete. For compatibility with previous Sun OpenGL versions */ 00199 #define GLU_INCOMPATIBLE_GL_VERSION 100903 00200 00201 00202 /*************************************************************/ 00203 00204 00205 #ifdef __cplusplus 00206 class GLUnurbs; 00207 class GLUquadric; 00208 class GLUtesselator; 00209 #else 00210 typedef struct GLUnurbs GLUnurbs; 00211 typedef struct GLUquadric GLUquadric; 00212 typedef struct GLUtesselator GLUtesselator; 00213 #endif 00214 00215 typedef GLUnurbs GLUnurbsObj; 00216 typedef GLUquadric GLUquadricObj; 00217 typedef GLUtesselator GLUtesselatorObj; 00218 typedef GLUtesselator GLUtriangulatorObj; 00219 00220 #define GLU_TESS_MAX_COORD 1.0e150 00221 00222 /* Internal convenience typedefs */ 00223 typedef void (APIENTRY *_GLUfuncptr)(); 00224 00225 GLAPI void APIENTRY gluBeginCurve (GLUnurbs* nurb); 00226 GLAPI void APIENTRY gluBeginPolygon (GLUtesselator* tess); 00227 GLAPI void APIENTRY gluBeginSurface (GLUnurbs* nurb); 00228 GLAPI void APIENTRY gluBeginTrim (GLUnurbs* nurb); 00229 GLAPI GLint APIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data); 00230 GLAPI GLint APIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data); 00231 GLAPI void APIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); 00232 GLAPI void APIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb); 00233 GLAPI void APIENTRY gluDeleteQuadric (GLUquadric* quad); 00234 GLAPI void APIENTRY gluDeleteTess (GLUtesselator* tess); 00235 GLAPI void APIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); 00236 GLAPI void APIENTRY gluEndCurve (GLUnurbs* nurb); 00237 GLAPI void APIENTRY gluEndPolygon (GLUtesselator* tess); 00238 GLAPI void APIENTRY gluEndSurface (GLUnurbs* nurb); 00239 GLAPI void APIENTRY gluEndTrim (GLUnurbs* nurb); 00240 GLAPI const GLubyte * APIENTRY gluErrorString (GLenum error); 00241 GLAPI const wchar_t * APIENTRY gluErrorUnicodeStringEXT (GLenum error); 00242 GLAPI void APIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data); 00243 GLAPI const GLubyte * APIENTRY gluGetString (GLenum name); 00244 GLAPI void APIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data); 00245 GLAPI void APIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view); 00246 GLAPI void APIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); 00247 GLAPI GLUnurbs* APIENTRY gluNewNurbsRenderer (void); 00248 GLAPI GLUquadric* APIENTRY gluNewQuadric (void); 00249 GLAPI GLUtesselator* APIENTRY gluNewTess (void); 00250 GLAPI void APIENTRY gluNextContour (GLUtesselator* tess, GLenum type); 00251 GLAPI void APIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc); 00252 GLAPI void APIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type); 00253 GLAPI void APIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value); 00254 GLAPI void APIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type); 00255 GLAPI void APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); 00256 GLAPI void APIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); 00257 GLAPI void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); 00258 GLAPI void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport); 00259 GLAPI GLint APIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); 00260 GLAPI void APIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type); 00261 GLAPI void APIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc); 00262 GLAPI void APIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw); 00263 GLAPI void APIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal); 00264 GLAPI void APIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation); 00265 GLAPI void APIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture); 00266 GLAPI GLint APIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); 00267 GLAPI void APIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks); 00268 GLAPI void APIENTRY gluTessBeginContour (GLUtesselator* tess); 00269 GLAPI void APIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data); 00270 GLAPI void APIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); 00271 GLAPI void APIENTRY gluTessEndContour (GLUtesselator* tess); 00272 GLAPI void APIENTRY gluTessEndPolygon (GLUtesselator* tess); 00273 GLAPI void APIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); 00274 GLAPI void APIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data); 00275 GLAPI void APIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data); 00276 GLAPI GLint APIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ); 00277 GLAPI GLint APIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW); 00278 00279 #ifdef UNICODE 00280 #define gluErrorStringWIN gluErrorUnicodeStringEXT 00281 #else 00282 #define gluErrorStringWIN gluErrorString 00283 #endif 00284 00285 #ifdef __cplusplus 00286 } 00287 #endif 00288 00289 #endif /* __glu_h__ */
Generated on Tue Jul 12 2022 19:59:54 by
1.7.2