ReactOS 0.4.15-dev-5667-ged97270
glu.h File Reference
#include <GL/gl.h>
Include dependency graph for glu.h:

Go to the source code of this file.

Macros

#define GLAPIENTRY
 
#define GLAPIENTRYP   GLAPIENTRY *
 
#define GLAPI   extern
 
#define GLU_EXT_object_space_tess   1
 
#define GLU_EXT_nurbs_tessellator   1
 
#define GLU_FALSE   0
 
#define GLU_TRUE   1
 
#define GLU_VERSION_1_1   1
 
#define GLU_VERSION_1_2   1
 
#define GLU_VERSION_1_3   1
 
#define GLU_VERSION   100800
 
#define GLU_EXTENSIONS   100801
 
#define GLU_INVALID_ENUM   100900
 
#define GLU_INVALID_VALUE   100901
 
#define GLU_OUT_OF_MEMORY   100902
 
#define GLU_INCOMPATIBLE_GL_VERSION   100903
 
#define GLU_INVALID_OPERATION   100904
 
#define GLU_OUTLINE_POLYGON   100240
 
#define GLU_OUTLINE_PATCH   100241
 
#define GLU_NURBS_ERROR   100103
 
#define GLU_ERROR   100103
 
#define GLU_NURBS_BEGIN   100164
 
#define GLU_NURBS_BEGIN_EXT   100164
 
#define GLU_NURBS_VERTEX   100165
 
#define GLU_NURBS_VERTEX_EXT   100165
 
#define GLU_NURBS_NORMAL   100166
 
#define GLU_NURBS_NORMAL_EXT   100166
 
#define GLU_NURBS_COLOR   100167
 
#define GLU_NURBS_COLOR_EXT   100167
 
#define GLU_NURBS_TEXTURE_COORD   100168
 
#define GLU_NURBS_TEX_COORD_EXT   100168
 
#define GLU_NURBS_END   100169
 
#define GLU_NURBS_END_EXT   100169
 
#define GLU_NURBS_BEGIN_DATA   100170
 
#define GLU_NURBS_BEGIN_DATA_EXT   100170
 
#define GLU_NURBS_VERTEX_DATA   100171
 
#define GLU_NURBS_VERTEX_DATA_EXT   100171
 
#define GLU_NURBS_NORMAL_DATA   100172
 
#define GLU_NURBS_NORMAL_DATA_EXT   100172
 
#define GLU_NURBS_COLOR_DATA   100173
 
#define GLU_NURBS_COLOR_DATA_EXT   100173
 
#define GLU_NURBS_TEXTURE_COORD_DATA   100174
 
#define GLU_NURBS_TEX_COORD_DATA_EXT   100174
 
#define GLU_NURBS_END_DATA   100175
 
#define GLU_NURBS_END_DATA_EXT   100175
 
#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
 
#define GLU_AUTO_LOAD_MATRIX   100200
 
#define GLU_CULLING   100201
 
#define GLU_SAMPLING_TOLERANCE   100203
 
#define GLU_DISPLAY_MODE   100204
 
#define GLU_PARAMETRIC_TOLERANCE   100202
 
#define GLU_SAMPLING_METHOD   100205
 
#define GLU_U_STEP   100206
 
#define GLU_V_STEP   100207
 
#define GLU_NURBS_MODE   100160
 
#define GLU_NURBS_MODE_EXT   100160
 
#define GLU_NURBS_TESSELLATOR   100161
 
#define GLU_NURBS_TESSELLATOR_EXT   100161
 
#define GLU_NURBS_RENDERER   100162
 
#define GLU_NURBS_RENDERER_EXT   100162
 
#define GLU_OBJECT_PARAMETRIC_ERROR   100208
 
#define GLU_OBJECT_PARAMETRIC_ERROR_EXT   100208
 
#define GLU_OBJECT_PATH_LENGTH   100209
 
#define GLU_OBJECT_PATH_LENGTH_EXT   100209
 
#define GLU_PATH_LENGTH   100215
 
#define GLU_PARAMETRIC_ERROR   100216
 
#define GLU_DOMAIN_DISTANCE   100217
 
#define GLU_MAP1_TRIM_2   100210
 
#define GLU_MAP1_TRIM_3   100211
 
#define GLU_POINT   100010
 
#define GLU_LINE   100011
 
#define GLU_FILL   100012
 
#define GLU_SILHOUETTE   100013
 
#define GLU_SMOOTH   100000
 
#define GLU_FLAT   100001
 
#define GLU_NONE   100002
 
#define GLU_OUTSIDE   100020
 
#define GLU_INSIDE   100021
 
#define GLU_TESS_BEGIN   100100
 
#define GLU_BEGIN   100100
 
#define GLU_TESS_VERTEX   100101
 
#define GLU_VERTEX   100101
 
#define GLU_TESS_END   100102
 
#define GLU_END   100102
 
#define GLU_TESS_ERROR   100103
 
#define GLU_TESS_EDGE_FLAG   100104
 
#define GLU_EDGE_FLAG   100104
 
#define GLU_TESS_COMBINE   100105
 
#define GLU_TESS_BEGIN_DATA   100106
 
#define GLU_TESS_VERTEX_DATA   100107
 
#define GLU_TESS_END_DATA   100108
 
#define GLU_TESS_ERROR_DATA   100109
 
#define GLU_TESS_EDGE_FLAG_DATA   100110
 
#define GLU_TESS_COMBINE_DATA   100111
 
#define GLU_CW   100120
 
#define GLU_CCW   100121
 
#define GLU_INTERIOR   100122
 
#define GLU_EXTERIOR   100123
 
#define GLU_UNKNOWN   100124
 
#define GLU_TESS_WINDING_RULE   100140
 
#define GLU_TESS_BOUNDARY_ONLY   100141
 
#define GLU_TESS_TOLERANCE   100142
 
#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
 
#define GLU_TESS_MISSING_BEGIN_POLYGON   100151
 
#define GLU_TESS_MISSING_BEGIN_CONTOUR   100152
 
#define GLU_TESS_MISSING_END_POLYGON   100153
 
#define GLU_TESS_MISSING_END_CONTOUR   100154
 
#define GLU_TESS_COORD_TOO_LARGE   100155
 
#define GLU_TESS_NEED_COMBINE_CALLBACK   100156
 
#define GLU_TESS_WINDING_ODD   100130
 
#define GLU_TESS_WINDING_NONZERO   100131
 
#define GLU_TESS_WINDING_POSITIVE   100132
 
#define GLU_TESS_WINDING_NEGATIVE   100133
 
#define GLU_TESS_WINDING_ABS_GEQ_TWO   100134
 
#define GLU_TESS_MAX_COORD   1.0e150
 

Typedefs

typedef struct GLUnurbs GLUnurbs
 
typedef struct GLUquadric GLUquadric
 
typedef struct GLUtesselator GLUtesselator
 
typedef GLUnurbs GLUnurbsObj
 
typedef GLUquadric GLUquadricObj
 
typedef GLUtesselator GLUtesselatorObj
 
typedef GLUtesselator GLUtriangulatorObj
 

Functions

typedef void (GLAPIENTRYP _GLUfuncptr)(void)
 
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs *nurb)
 
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator *tess)
 
GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs *nurb)
 
GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs *nurb)
 
GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data)
 
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data)
 
GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data)
 
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data)
 
GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data)
 
GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)
 
GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString)
 
GLAPI void GLAPIENTRY gluCylinder (GLUquadric *quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks)
 
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs *nurb)
 
GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric *quad)
 
GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator *tess)
 
GLAPI void GLAPIENTRY gluDisk (GLUquadric *quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops)
 
GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs *nurb)
 
GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator *tess)
 
GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs *nurb)
 
GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs *nurb)
 
GLAPI const GLubyte *GLAPIENTRY gluErrorString (GLenum error)
 
GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs *nurb, GLenum property, GLfloat *data)
 
GLAPI const GLubyte *GLAPIENTRY gluGetString (GLenum name)
 
GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator *tess, GLenum which, GLdouble *data)
 
GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs *nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view)
 
GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ)
 
GLAPI GLUnurbs *GLAPIENTRY gluNewNurbsRenderer (void)
 
GLAPI GLUquadric *GLAPIENTRY gluNewQuadric (void)
 
GLAPI GLUtesselator *GLAPIENTRY gluNewTess (void)
 
GLAPI void GLAPIENTRY gluNextContour (GLUtesselator *tess, GLenum type)
 
GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs *nurb, GLenum which, _GLUfuncptr CallBackFunc)
 
GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs *nurb, GLvoid *userData)
 
GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs *nurb, GLvoid *userData)
 
GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs *nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type)
 
GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs *nurb, GLenum property, GLfloat value)
 
GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs *nurb, GLint sKnotCount, GLfloat *sKnots, GLint tKnotCount, GLfloat *tKnots, GLint sStride, GLint tStride, GLfloat *control, GLint sOrder, GLint tOrder, GLenum type)
 
GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)
 
GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric *quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep)
 
GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
 
GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport)
 
GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble *winX, GLdouble *winY, GLdouble *winZ)
 
GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs *nurb, GLint count, GLfloat *data, GLint stride, GLenum type)
 
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric *quad, GLenum which, _GLUfuncptr CallBackFunc)
 
GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric *quad, GLenum draw)
 
GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric *quad, GLenum normal)
 
GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric *quad, GLenum orientation)
 
GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric *quad, GLboolean texture)
 
GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid *dataOut)
 
GLAPI void GLAPIENTRY gluSphere (GLUquadric *quad, GLdouble radius, GLint slices, GLint stacks)
 
GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator *tess)
 
GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator *tess, GLvoid *data)
 
GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator *tess, GLenum which, _GLUfuncptr CallBackFunc)
 
GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator *tess)
 
GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator *tess)
 
GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator *tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ)
 
GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator *tess, GLenum which, GLdouble data)
 
GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator *tess, GLdouble *location, GLvoid *data)
 
GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble *objX, GLdouble *objY, GLdouble *objZ)
 
GLAPI GLint GLAPIENTRY 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)
 

Macro Definition Documentation

◆ GLAPI

#define GLAPI   extern

Definition at line 61 of file glu.h.

◆ GLAPIENTRY

#define GLAPIENTRY

Definition at line 44 of file glu.h.

◆ GLAPIENTRYP

#define GLAPIENTRYP   GLAPIENTRY *

Definition at line 49 of file glu.h.

◆ GLU_AUTO_LOAD_MATRIX

#define GLU_AUTO_LOAD_MATRIX   100200

Definition at line 167 of file glu.h.

◆ GLU_BEGIN

#define GLU_BEGIN   100100

Definition at line 215 of file glu.h.

◆ GLU_CCW

#define GLU_CCW   100121

Definition at line 233 of file glu.h.

◆ GLU_CULLING

#define GLU_CULLING   100201

Definition at line 168 of file glu.h.

◆ GLU_CW

#define GLU_CW   100120

Definition at line 232 of file glu.h.

◆ GLU_DISPLAY_MODE

#define GLU_DISPLAY_MODE   100204

Definition at line 170 of file glu.h.

◆ GLU_DOMAIN_DISTANCE

#define GLU_DOMAIN_DISTANCE   100217

Definition at line 189 of file glu.h.

◆ GLU_EDGE_FLAG

#define GLU_EDGE_FLAG   100104

Definition at line 222 of file glu.h.

◆ GLU_END

#define GLU_END   100102

Definition at line 219 of file glu.h.

◆ GLU_ERROR

#define GLU_ERROR   100103

Definition at line 101 of file glu.h.

◆ GLU_EXT_nurbs_tessellator

#define GLU_EXT_nurbs_tessellator   1

Definition at line 72 of file glu.h.

◆ GLU_EXT_object_space_tess

#define GLU_EXT_object_space_tess   1

Definition at line 71 of file glu.h.

◆ GLU_EXTENSIONS

#define GLU_EXTENSIONS   100801

Definition at line 85 of file glu.h.

◆ GLU_EXTERIOR

#define GLU_EXTERIOR   100123

Definition at line 235 of file glu.h.

◆ GLU_FALSE

#define GLU_FALSE   0

Definition at line 75 of file glu.h.

◆ GLU_FILL

#define GLU_FILL   100012

Definition at line 198 of file glu.h.

◆ GLU_FLAT

#define GLU_FLAT   100001

Definition at line 206 of file glu.h.

◆ GLU_INCOMPATIBLE_GL_VERSION

#define GLU_INCOMPATIBLE_GL_VERSION   100903

Definition at line 91 of file glu.h.

◆ GLU_INSIDE

#define GLU_INSIDE   100021

Definition at line 211 of file glu.h.

◆ GLU_INTERIOR

#define GLU_INTERIOR   100122

Definition at line 234 of file glu.h.

◆ GLU_INVALID_ENUM

#define GLU_INVALID_ENUM   100900

Definition at line 88 of file glu.h.

◆ GLU_INVALID_OPERATION

#define GLU_INVALID_OPERATION   100904

Definition at line 92 of file glu.h.

◆ GLU_INVALID_VALUE

#define GLU_INVALID_VALUE   100901

Definition at line 89 of file glu.h.

◆ GLU_LINE

#define GLU_LINE   100011

Definition at line 197 of file glu.h.

◆ GLU_MAP1_TRIM_2

#define GLU_MAP1_TRIM_2   100210

Definition at line 192 of file glu.h.

◆ GLU_MAP1_TRIM_3

#define GLU_MAP1_TRIM_3   100211

Definition at line 193 of file glu.h.

◆ GLU_NONE

#define GLU_NONE   100002

Definition at line 207 of file glu.h.

◆ GLU_NURBS_BEGIN

#define GLU_NURBS_BEGIN   100164

Definition at line 102 of file glu.h.

◆ GLU_NURBS_BEGIN_DATA

#define GLU_NURBS_BEGIN_DATA   100170

Definition at line 114 of file glu.h.

◆ GLU_NURBS_BEGIN_DATA_EXT

#define GLU_NURBS_BEGIN_DATA_EXT   100170

Definition at line 115 of file glu.h.

◆ GLU_NURBS_BEGIN_EXT

#define GLU_NURBS_BEGIN_EXT   100164

Definition at line 103 of file glu.h.

◆ GLU_NURBS_COLOR

#define GLU_NURBS_COLOR   100167

Definition at line 108 of file glu.h.

◆ GLU_NURBS_COLOR_DATA

#define GLU_NURBS_COLOR_DATA   100173

Definition at line 120 of file glu.h.

◆ GLU_NURBS_COLOR_DATA_EXT

#define GLU_NURBS_COLOR_DATA_EXT   100173

Definition at line 121 of file glu.h.

◆ GLU_NURBS_COLOR_EXT

#define GLU_NURBS_COLOR_EXT   100167

Definition at line 109 of file glu.h.

◆ GLU_NURBS_END

#define GLU_NURBS_END   100169

Definition at line 112 of file glu.h.

◆ GLU_NURBS_END_DATA

#define GLU_NURBS_END_DATA   100175

Definition at line 124 of file glu.h.

◆ GLU_NURBS_END_DATA_EXT

#define GLU_NURBS_END_DATA_EXT   100175

Definition at line 125 of file glu.h.

◆ GLU_NURBS_END_EXT

#define GLU_NURBS_END_EXT   100169

Definition at line 113 of file glu.h.

◆ GLU_NURBS_ERROR

#define GLU_NURBS_ERROR   100103

Definition at line 100 of file glu.h.

◆ GLU_NURBS_ERROR1

#define GLU_NURBS_ERROR1   100251

Definition at line 128 of file glu.h.

◆ GLU_NURBS_ERROR10

#define GLU_NURBS_ERROR10   100260

Definition at line 137 of file glu.h.

◆ GLU_NURBS_ERROR11

#define GLU_NURBS_ERROR11   100261

Definition at line 138 of file glu.h.

◆ GLU_NURBS_ERROR12

#define GLU_NURBS_ERROR12   100262

Definition at line 139 of file glu.h.

◆ GLU_NURBS_ERROR13

#define GLU_NURBS_ERROR13   100263

Definition at line 140 of file glu.h.

◆ GLU_NURBS_ERROR14

#define GLU_NURBS_ERROR14   100264

Definition at line 141 of file glu.h.

◆ GLU_NURBS_ERROR15

#define GLU_NURBS_ERROR15   100265

Definition at line 142 of file glu.h.

◆ GLU_NURBS_ERROR16

#define GLU_NURBS_ERROR16   100266

Definition at line 143 of file glu.h.

◆ GLU_NURBS_ERROR17

#define GLU_NURBS_ERROR17   100267

Definition at line 144 of file glu.h.

◆ GLU_NURBS_ERROR18

#define GLU_NURBS_ERROR18   100268

Definition at line 145 of file glu.h.

◆ GLU_NURBS_ERROR19

#define GLU_NURBS_ERROR19   100269

Definition at line 146 of file glu.h.

◆ GLU_NURBS_ERROR2

#define GLU_NURBS_ERROR2   100252

Definition at line 129 of file glu.h.

◆ GLU_NURBS_ERROR20

#define GLU_NURBS_ERROR20   100270

Definition at line 147 of file glu.h.

◆ GLU_NURBS_ERROR21

#define GLU_NURBS_ERROR21   100271

Definition at line 148 of file glu.h.

◆ GLU_NURBS_ERROR22

#define GLU_NURBS_ERROR22   100272

Definition at line 149 of file glu.h.

◆ GLU_NURBS_ERROR23

#define GLU_NURBS_ERROR23   100273

Definition at line 150 of file glu.h.

◆ GLU_NURBS_ERROR24

#define GLU_NURBS_ERROR24   100274

Definition at line 151 of file glu.h.

◆ GLU_NURBS_ERROR25

#define GLU_NURBS_ERROR25   100275

Definition at line 152 of file glu.h.

◆ GLU_NURBS_ERROR26

#define GLU_NURBS_ERROR26   100276

Definition at line 153 of file glu.h.

◆ GLU_NURBS_ERROR27

#define GLU_NURBS_ERROR27   100277

Definition at line 154 of file glu.h.

◆ GLU_NURBS_ERROR28

#define GLU_NURBS_ERROR28   100278

Definition at line 155 of file glu.h.

◆ GLU_NURBS_ERROR29

#define GLU_NURBS_ERROR29   100279

Definition at line 156 of file glu.h.

◆ GLU_NURBS_ERROR3

#define GLU_NURBS_ERROR3   100253

Definition at line 130 of file glu.h.

◆ GLU_NURBS_ERROR30

#define GLU_NURBS_ERROR30   100280

Definition at line 157 of file glu.h.

◆ GLU_NURBS_ERROR31

#define GLU_NURBS_ERROR31   100281

Definition at line 158 of file glu.h.

◆ GLU_NURBS_ERROR32

#define GLU_NURBS_ERROR32   100282

Definition at line 159 of file glu.h.

◆ GLU_NURBS_ERROR33

#define GLU_NURBS_ERROR33   100283

Definition at line 160 of file glu.h.

◆ GLU_NURBS_ERROR34

#define GLU_NURBS_ERROR34   100284

Definition at line 161 of file glu.h.

◆ GLU_NURBS_ERROR35

#define GLU_NURBS_ERROR35   100285

Definition at line 162 of file glu.h.

◆ GLU_NURBS_ERROR36

#define GLU_NURBS_ERROR36   100286

Definition at line 163 of file glu.h.

◆ GLU_NURBS_ERROR37

#define GLU_NURBS_ERROR37   100287

Definition at line 164 of file glu.h.

◆ GLU_NURBS_ERROR4

#define GLU_NURBS_ERROR4   100254

Definition at line 131 of file glu.h.

◆ GLU_NURBS_ERROR5

#define GLU_NURBS_ERROR5   100255

Definition at line 132 of file glu.h.

◆ GLU_NURBS_ERROR6

#define GLU_NURBS_ERROR6   100256

Definition at line 133 of file glu.h.

◆ GLU_NURBS_ERROR7

#define GLU_NURBS_ERROR7   100257

Definition at line 134 of file glu.h.

◆ GLU_NURBS_ERROR8

#define GLU_NURBS_ERROR8   100258

Definition at line 135 of file glu.h.

◆ GLU_NURBS_ERROR9

#define GLU_NURBS_ERROR9   100259

Definition at line 136 of file glu.h.

◆ GLU_NURBS_MODE

#define GLU_NURBS_MODE   100160

Definition at line 175 of file glu.h.

◆ GLU_NURBS_MODE_EXT

#define GLU_NURBS_MODE_EXT   100160

Definition at line 176 of file glu.h.

◆ GLU_NURBS_NORMAL

#define GLU_NURBS_NORMAL   100166

Definition at line 106 of file glu.h.

◆ GLU_NURBS_NORMAL_DATA

#define GLU_NURBS_NORMAL_DATA   100172

Definition at line 118 of file glu.h.

◆ GLU_NURBS_NORMAL_DATA_EXT

#define GLU_NURBS_NORMAL_DATA_EXT   100172

Definition at line 119 of file glu.h.

◆ GLU_NURBS_NORMAL_EXT

#define GLU_NURBS_NORMAL_EXT   100166

Definition at line 107 of file glu.h.

◆ GLU_NURBS_RENDERER

#define GLU_NURBS_RENDERER   100162

Definition at line 179 of file glu.h.

◆ GLU_NURBS_RENDERER_EXT

#define GLU_NURBS_RENDERER_EXT   100162

Definition at line 180 of file glu.h.

◆ GLU_NURBS_TESSELLATOR

#define GLU_NURBS_TESSELLATOR   100161

Definition at line 177 of file glu.h.

◆ GLU_NURBS_TESSELLATOR_EXT

#define GLU_NURBS_TESSELLATOR_EXT   100161

Definition at line 178 of file glu.h.

◆ GLU_NURBS_TEX_COORD_DATA_EXT

#define GLU_NURBS_TEX_COORD_DATA_EXT   100174

Definition at line 123 of file glu.h.

◆ GLU_NURBS_TEX_COORD_EXT

#define GLU_NURBS_TEX_COORD_EXT   100168

Definition at line 111 of file glu.h.

◆ GLU_NURBS_TEXTURE_COORD

#define GLU_NURBS_TEXTURE_COORD   100168

Definition at line 110 of file glu.h.

◆ GLU_NURBS_TEXTURE_COORD_DATA

#define GLU_NURBS_TEXTURE_COORD_DATA   100174

Definition at line 122 of file glu.h.

◆ GLU_NURBS_VERTEX

#define GLU_NURBS_VERTEX   100165

Definition at line 104 of file glu.h.

◆ GLU_NURBS_VERTEX_DATA

#define GLU_NURBS_VERTEX_DATA   100171

Definition at line 116 of file glu.h.

◆ GLU_NURBS_VERTEX_DATA_EXT

#define GLU_NURBS_VERTEX_DATA_EXT   100171

Definition at line 117 of file glu.h.

◆ GLU_NURBS_VERTEX_EXT

#define GLU_NURBS_VERTEX_EXT   100165

Definition at line 105 of file glu.h.

◆ GLU_OBJECT_PARAMETRIC_ERROR

#define GLU_OBJECT_PARAMETRIC_ERROR   100208

Definition at line 183 of file glu.h.

◆ GLU_OBJECT_PARAMETRIC_ERROR_EXT

#define GLU_OBJECT_PARAMETRIC_ERROR_EXT   100208

Definition at line 184 of file glu.h.

◆ GLU_OBJECT_PATH_LENGTH

#define GLU_OBJECT_PATH_LENGTH   100209

Definition at line 185 of file glu.h.

◆ GLU_OBJECT_PATH_LENGTH_EXT

#define GLU_OBJECT_PATH_LENGTH_EXT   100209

Definition at line 186 of file glu.h.

◆ GLU_OUT_OF_MEMORY

#define GLU_OUT_OF_MEMORY   100902

Definition at line 90 of file glu.h.

◆ GLU_OUTLINE_PATCH

#define GLU_OUTLINE_PATCH   100241

Definition at line 97 of file glu.h.

◆ GLU_OUTLINE_POLYGON

#define GLU_OUTLINE_POLYGON   100240

Definition at line 96 of file glu.h.

◆ GLU_OUTSIDE

#define GLU_OUTSIDE   100020

Definition at line 210 of file glu.h.

◆ GLU_PARAMETRIC_ERROR

#define GLU_PARAMETRIC_ERROR   100216

Definition at line 188 of file glu.h.

◆ GLU_PARAMETRIC_TOLERANCE

#define GLU_PARAMETRIC_TOLERANCE   100202

Definition at line 171 of file glu.h.

◆ GLU_PATH_LENGTH

#define GLU_PATH_LENGTH   100215

Definition at line 187 of file glu.h.

◆ GLU_POINT

#define GLU_POINT   100010

Definition at line 196 of file glu.h.

◆ GLU_SAMPLING_METHOD

#define GLU_SAMPLING_METHOD   100205

Definition at line 172 of file glu.h.

◆ GLU_SAMPLING_TOLERANCE

#define GLU_SAMPLING_TOLERANCE   100203

Definition at line 169 of file glu.h.

◆ GLU_SILHOUETTE

#define GLU_SILHOUETTE   100013

Definition at line 199 of file glu.h.

◆ GLU_SMOOTH

#define GLU_SMOOTH   100000

Definition at line 205 of file glu.h.

◆ GLU_TESS_BEGIN

#define GLU_TESS_BEGIN   100100

Definition at line 214 of file glu.h.

◆ GLU_TESS_BEGIN_DATA

#define GLU_TESS_BEGIN_DATA   100106

Definition at line 224 of file glu.h.

◆ GLU_TESS_BOUNDARY_ONLY

#define GLU_TESS_BOUNDARY_ONLY   100141

Definition at line 240 of file glu.h.

◆ GLU_TESS_COMBINE

#define GLU_TESS_COMBINE   100105

Definition at line 223 of file glu.h.

◆ GLU_TESS_COMBINE_DATA

#define GLU_TESS_COMBINE_DATA   100111

Definition at line 229 of file glu.h.

◆ GLU_TESS_COORD_TOO_LARGE

#define GLU_TESS_COORD_TOO_LARGE   100155

Definition at line 256 of file glu.h.

◆ GLU_TESS_EDGE_FLAG

#define GLU_TESS_EDGE_FLAG   100104

Definition at line 221 of file glu.h.

◆ GLU_TESS_EDGE_FLAG_DATA

#define GLU_TESS_EDGE_FLAG_DATA   100110

Definition at line 228 of file glu.h.

◆ GLU_TESS_END

#define GLU_TESS_END   100102

Definition at line 218 of file glu.h.

◆ GLU_TESS_END_DATA

#define GLU_TESS_END_DATA   100108

Definition at line 226 of file glu.h.

◆ GLU_TESS_ERROR

#define GLU_TESS_ERROR   100103

Definition at line 220 of file glu.h.

◆ GLU_TESS_ERROR1

#define GLU_TESS_ERROR1   100151

Definition at line 244 of file glu.h.

◆ GLU_TESS_ERROR2

#define GLU_TESS_ERROR2   100152

Definition at line 245 of file glu.h.

◆ GLU_TESS_ERROR3

#define GLU_TESS_ERROR3   100153

Definition at line 246 of file glu.h.

◆ GLU_TESS_ERROR4

#define GLU_TESS_ERROR4   100154

Definition at line 247 of file glu.h.

◆ GLU_TESS_ERROR5

#define GLU_TESS_ERROR5   100155

Definition at line 248 of file glu.h.

◆ GLU_TESS_ERROR6

#define GLU_TESS_ERROR6   100156

Definition at line 249 of file glu.h.

◆ GLU_TESS_ERROR7

#define GLU_TESS_ERROR7   100157

Definition at line 250 of file glu.h.

◆ GLU_TESS_ERROR8

#define GLU_TESS_ERROR8   100158

Definition at line 251 of file glu.h.

◆ GLU_TESS_ERROR_DATA

#define GLU_TESS_ERROR_DATA   100109

Definition at line 227 of file glu.h.

◆ GLU_TESS_MAX_COORD

#define GLU_TESS_MAX_COORD   1.0e150

Definition at line 284 of file glu.h.

◆ GLU_TESS_MISSING_BEGIN_CONTOUR

#define GLU_TESS_MISSING_BEGIN_CONTOUR   100152

Definition at line 253 of file glu.h.

◆ GLU_TESS_MISSING_BEGIN_POLYGON

#define GLU_TESS_MISSING_BEGIN_POLYGON   100151

Definition at line 252 of file glu.h.

◆ GLU_TESS_MISSING_END_CONTOUR

#define GLU_TESS_MISSING_END_CONTOUR   100154

Definition at line 255 of file glu.h.

◆ GLU_TESS_MISSING_END_POLYGON

#define GLU_TESS_MISSING_END_POLYGON   100153

Definition at line 254 of file glu.h.

◆ GLU_TESS_NEED_COMBINE_CALLBACK

#define GLU_TESS_NEED_COMBINE_CALLBACK   100156

Definition at line 257 of file glu.h.

◆ GLU_TESS_TOLERANCE

#define GLU_TESS_TOLERANCE   100142

Definition at line 241 of file glu.h.

◆ GLU_TESS_VERTEX

#define GLU_TESS_VERTEX   100101

Definition at line 216 of file glu.h.

◆ GLU_TESS_VERTEX_DATA

#define GLU_TESS_VERTEX_DATA   100107

Definition at line 225 of file glu.h.

◆ GLU_TESS_WINDING_ABS_GEQ_TWO

#define GLU_TESS_WINDING_ABS_GEQ_TWO   100134

Definition at line 264 of file glu.h.

◆ GLU_TESS_WINDING_NEGATIVE

#define GLU_TESS_WINDING_NEGATIVE   100133

Definition at line 263 of file glu.h.

◆ GLU_TESS_WINDING_NONZERO

#define GLU_TESS_WINDING_NONZERO   100131

Definition at line 261 of file glu.h.

◆ GLU_TESS_WINDING_ODD

#define GLU_TESS_WINDING_ODD   100130

Definition at line 260 of file glu.h.

◆ GLU_TESS_WINDING_POSITIVE

#define GLU_TESS_WINDING_POSITIVE   100132

Definition at line 262 of file glu.h.

◆ GLU_TESS_WINDING_RULE

#define GLU_TESS_WINDING_RULE   100140

Definition at line 239 of file glu.h.

◆ GLU_TRUE

#define GLU_TRUE   1

Definition at line 76 of file glu.h.

◆ GLU_U_STEP

#define GLU_U_STEP   100206

Definition at line 173 of file glu.h.

◆ GLU_UNKNOWN

#define GLU_UNKNOWN   100124

Definition at line 236 of file glu.h.

◆ GLU_V_STEP

#define GLU_V_STEP   100207

Definition at line 174 of file glu.h.

◆ GLU_VERSION

#define GLU_VERSION   100800

Definition at line 84 of file glu.h.

◆ GLU_VERSION_1_1

#define GLU_VERSION_1_1   1

Definition at line 79 of file glu.h.

◆ GLU_VERSION_1_2

#define GLU_VERSION_1_2   1

Definition at line 80 of file glu.h.

◆ GLU_VERSION_1_3

#define GLU_VERSION_1_3   1

Definition at line 81 of file glu.h.

◆ GLU_VERTEX

#define GLU_VERTEX   100101

Definition at line 217 of file glu.h.

Typedef Documentation

◆ GLUnurbs

Definition at line 274 of file glu.h.

◆ GLUnurbsObj

Definition at line 279 of file glu.h.

◆ GLUquadric

Definition at line 275 of file glu.h.

◆ GLUquadricObj

Definition at line 280 of file glu.h.

◆ GLUtesselator

Definition at line 276 of file glu.h.

◆ GLUtesselatorObj

Definition at line 281 of file glu.h.

◆ GLUtriangulatorObj

Definition at line 282 of file glu.h.

Function Documentation

◆ gluBeginCurve()

GLAPI void GLAPIENTRY gluBeginCurve ( GLUnurbs nurb)

Definition at line 99 of file glinterface.cc.

100{
101 r->bgncurve(0);
102}
GLdouble GLdouble GLdouble r
Definition: gl.h:2055

◆ gluBeginPolygon()

GLAPI void GLAPIENTRY gluBeginPolygon ( GLUtesselator tess)

Definition at line 611 of file tess.c.

612{
613 gluTessBeginPolygon( tess, NULL );
614 gluTessBeginContour( tess );
615}
#define NULL
Definition: types.h:112
#define gluTessBeginContour
Definition: glu_mangle.h:65
#define gluTessBeginPolygon
Definition: glu_mangle.h:64

◆ gluBeginSurface()

GLAPI void GLAPIENTRY gluBeginSurface ( GLUnurbs nurb)

Definition at line 89 of file glinterface.cc.

90{
91#ifdef DOWN_LOAD_NURBS
92surfcount++;
93tempTrim = OTL_make(10,10);
94#endif
95 r->bgnsurface(0);
96}

◆ gluBeginTrim()

GLAPI void GLAPIENTRY gluBeginTrim ( GLUnurbs nurb)

Definition at line 131 of file glinterface.cc.

132{
133#ifdef DOWN_LOAD_NURBS
134OTL_bgnTrim(tempTrim);
135#endif
136
137 r->bgntrim();
138}

◆ gluBuild1DMipmapLevels()

GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels ( GLenum  target,
GLint  internalFormat,
GLsizei  width,
GLenum  format,
GLenum  type,
GLint  level,
GLint  base,
GLint  max,
const void data 
)

Definition at line 3643 of file mipmap.c.

3648{
3649 int levels;
3650
3652 if (rc != 0) return rc;
3653
3654 if (width < 1) {
3655 return GLU_INVALID_VALUE;
3656 }
3657
3659
3660 levels+= userLevel;
3661 if (!isLegalLevels(userLevel,baseLevel,maxLevel,levels))
3662 return GLU_INVALID_VALUE;
3663
3665 width,
3666 width,format, type,
3667 userLevel, baseLevel, maxLevel,
3668 data);
3669} /* gluBuild1DMipmapLevels() */
#define GLU_INVALID_VALUE
Definition: glu.h:89
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLsizei levels
Definition: glext.h:7884
GLenum internalFormat
Definition: glext.h:8404
GLenum target
Definition: glext.h:7315
static int computeLog(GLuint value)
Definition: mipmap.c:287
static int checkMipmapArgs(GLenum, GLenum, GLenum)
Definition: mipmap.c:3270
static int gluBuild1DMipmapLevelsCore(GLenum, GLint, GLsizei, GLsizei, GLenum, GLenum, GLint, GLint, GLint, const void *)
Definition: mipmap.c:3547
static GLboolean isLegalLevels(GLint, GLint, GLint, GLint)
Definition: mipmap.c:3393

◆ gluBuild1DMipmaps()

GLAPI GLint GLAPIENTRY gluBuild1DMipmaps ( GLenum  target,
GLint  internalFormat,
GLsizei  width,
GLenum  format,
GLenum  type,
const void data 
)

Definition at line 3672 of file mipmap.c.

3675{
3676 GLint widthPowerOf2;
3677 int levels;
3678 GLint dummy;
3679
3681 if (rc != 0) return rc;
3682
3683 if (width < 1) {
3684 return GLU_INVALID_VALUE;
3685 }
3686
3688 levels = computeLog(widthPowerOf2);
3689
3691 width,
3692 widthPowerOf2,
3693 format,type,0,0,levels,data);
3694}
int GLint
Definition: gl.h:156
static void closestFit(GLenum, GLint, GLint, GLint, GLenum, GLenum, GLint *, GLint *)
Definition: mipmap.c:3410

◆ gluBuild2DMipmapLevels()

GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels ( GLenum  target,
GLint  internalFormat,
GLsizei  width,
GLsizei  height,
GLenum  format,
GLenum  type,
GLint  level,
GLint  base,
GLint  max,
const void data 
)

Definition at line 4554 of file mipmap.c.

4559{
4560 int level, levels;
4561
4563 if (rc != 0) return rc;
4564
4565 if (width < 1 || height < 1) {
4566 return GLU_INVALID_VALUE;
4567 }
4568
4571 if (level > levels) levels=level;
4572
4573 levels+= userLevel;
4574 if (!isLegalLevels(userLevel,baseLevel,maxLevel,levels))
4575 return GLU_INVALID_VALUE;
4576
4578 width, height,
4579 width, height,
4580 format, type,
4581 userLevel, baseLevel, maxLevel,
4582 data);
4583} /* gluBuild2DMipmapLevels() */
GLint level
Definition: gl.h:1546
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
static int gluBuild2DMipmapLevelsCore(GLenum, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLint, GLint, GLint, const void *)
Definition: mipmap.c:3802

◆ gluBuild2DMipmaps()

GLAPI GLint GLAPIENTRY gluBuild2DMipmaps ( GLenum  target,
GLint  internalFormat,
GLsizei  width,
GLsizei  height,
GLenum  format,
GLenum  type,
const void data 
)

Definition at line 4586 of file mipmap.c.

4590{
4591 GLint widthPowerOf2, heightPowerOf2;
4592 int level, levels;
4593
4595 if (rc != 0) return rc;
4596
4597 if (width < 1 || height < 1) {
4598 return GLU_INVALID_VALUE;
4599 }
4600
4602 &widthPowerOf2,&heightPowerOf2);
4603
4604 levels = computeLog(widthPowerOf2);
4605 level = computeLog(heightPowerOf2);
4606 if (level > levels) levels=level;
4607
4609 width, height,
4610 widthPowerOf2,heightPowerOf2,
4611 format,type,
4612 0,0,levels,data);
4613} /* gluBuild2DMipmaps() */

◆ gluBuild3DMipmapLevels()

GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels ( GLenum  target,
GLint  internalFormat,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
GLenum  format,
GLenum  type,
GLint  level,
GLint  base,
GLint  max,
const void data 
)

Definition at line 8446 of file mipmap.c.

8451{
8452 int level, levels;
8453
8455 if (rc != 0) return rc;
8456
8457 if (width < 1 || height < 1 || depth < 1) {
8458 return GLU_INVALID_VALUE;
8459 }
8460
8461 if(type == GL_BITMAP) {
8462 return GLU_INVALID_ENUM;
8463 }
8464
8467 if (level > levels) levels=level;
8469 if (level > levels) levels=level;
8470
8471 levels+= userLevel;
8472 if (!isLegalLevels(userLevel,baseLevel,maxLevel,levels))
8473 return GLU_INVALID_VALUE;
8474
8476 width, height, depth,
8477 width, height, depth,
8478 format, type,
8479 userLevel, baseLevel, maxLevel,
8480 data);
8481} /* gluBuild3DMipmapLevels() */
#define GLU_INVALID_ENUM
Definition: glu.h:88
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
#define GL_BITMAP
Definition: gl.h:497
static int gluBuild3DMipmapLevelsCore(GLenum, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, GLint, GLint, GLint, const void *)
Definition: mipmap.c:7722

◆ gluBuild3DMipmaps()

GLAPI GLint GLAPIENTRY gluBuild3DMipmaps ( GLenum  target,
GLint  internalFormat,
GLsizei  width,
GLsizei  height,
GLsizei  depth,
GLenum  format,
GLenum  type,
const void data 
)

Definition at line 8484 of file mipmap.c.

8487{
8488 GLint widthPowerOf2, heightPowerOf2, depthPowerOf2;
8489 int level, levels;
8490
8492 if (rc != 0) return rc;
8493
8494 if (width < 1 || height < 1 || depth < 1) {
8495 return GLU_INVALID_VALUE;
8496 }
8497
8498 if(type == GL_BITMAP) {
8499 return GLU_INVALID_ENUM;
8500 }
8501
8503 &widthPowerOf2,&heightPowerOf2,&depthPowerOf2);
8504
8505 levels = computeLog(widthPowerOf2);
8506 level = computeLog(heightPowerOf2);
8507 if (level > levels) levels=level;
8508 level = computeLog(depthPowerOf2);
8509 if (level > levels) levels=level;
8510
8512 width, height, depth,
8513 widthPowerOf2, heightPowerOf2,
8514 depthPowerOf2,
8515 format, type, 0, 0, levels,
8516 data);
8517} /* gluBuild3DMipmaps() */
static void closestFit3D(GLenum target, GLint width, GLint height, GLint depth, GLint internalFormat, GLenum format, GLenum type, GLint *newWidth, GLint *newHeight, GLint *newDepth)
Definition: mipmap.c:7412

◆ gluCheckExtension()

GLAPI GLboolean GLAPIENTRY gluCheckExtension ( const GLubyte extName,
const GLubyte extString 
)

Definition at line 63 of file registry.c.

64{
66 char *word;
67 char *lookHere;
68 char *deleteThis;
69
70 if (extString == NULL) return GL_FALSE;
71
72 deleteThis = lookHere = (char *)malloc(strlen((const char *)extString)+1);
73 if (lookHere == NULL)
74 return GL_FALSE;
75 /* strtok() will modify string, so copy it somewhere */
76 strcpy(lookHere,(const char *)extString);
77
78 while ((word= strtok(lookHere," ")) != NULL) {
79 if (strcmp(word,(const char *)extName) == 0) {
80 flag = GL_TRUE;
81 break;
82 }
83 lookHere = NULL; /* get next token */
84 }
85 free((void *)deleteThis);
86 return flag;
87} /* gluCheckExtension() */
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
char * strtok(char *String, const char *Delimiters)
Definition: utclib.c:338
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define GL_TRUE
Definition: gl.h:174
#define GL_FALSE
Definition: gl.h:173
unsigned char GLboolean
Definition: gl.h:151
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
const WCHAR * word
Definition: lex.c:36

◆ gluCylinder()

GLAPI void GLAPIENTRY gluCylinder ( GLUquadric quad,
GLdouble  base,
GLdouble  top,
GLdouble  height,
GLint  slices,
GLint  stacks 
)

Definition at line 150 of file quad.c.

152{
153 GLint i,j;
154 GLfloat sinCache[CACHE_SIZE];
155 GLfloat cosCache[CACHE_SIZE];
156 GLfloat sinCache2[CACHE_SIZE];
157 GLfloat cosCache2[CACHE_SIZE];
158 GLfloat sinCache3[CACHE_SIZE];
159 GLfloat cosCache3[CACHE_SIZE];
161 GLfloat zLow, zHigh;
162 GLfloat sintemp, costemp;
164 GLfloat deltaRadius;
165 GLfloat zNormal;
166 GLfloat xyNormalRatio;
167 GLfloat radiusLow, radiusHigh;
168 int needCache2, needCache3;
169
170 if (slices >= CACHE_SIZE) slices = CACHE_SIZE-1;
171
172 if (slices < 2 || stacks < 1 || baseRadius < 0.0 || topRadius < 0.0 ||
173 height < 0.0) {
175 return;
176 }
177
178 /* Compute length (needed for normal calculations) */
179 deltaRadius = baseRadius - topRadius;
180 length = SQRT(deltaRadius*deltaRadius + height*height);
181 if (length == 0.0) {
183 return;
184 }
185
186 /* Cache is the vertex locations cache */
187 /* Cache2 is the various normals at the vertices themselves */
188 /* Cache3 is the various normals for the faces */
189 needCache2 = needCache3 = 0;
190 if (qobj->normals == GLU_SMOOTH) {
191 needCache2 = 1;
192 }
193
194 if (qobj->normals == GLU_FLAT) {
195 if (qobj->drawStyle != GLU_POINT) {
196 needCache3 = 1;
197 }
198 if (qobj->drawStyle == GLU_LINE) {
199 needCache2 = 1;
200 }
201 }
202
203 zNormal = deltaRadius / length;
204 xyNormalRatio = height / length;
205
206 for (i = 0; i < slices; i++) {
207 angle = 2 * PI * i / slices;
208 if (needCache2) {
209 if (qobj->orientation == GLU_OUTSIDE) {
210 sinCache2[i] = xyNormalRatio * SIN(angle);
211 cosCache2[i] = xyNormalRatio * COS(angle);
212 } else {
213 sinCache2[i] = -xyNormalRatio * SIN(angle);
214 cosCache2[i] = -xyNormalRatio * COS(angle);
215 }
216 }
217 sinCache[i] = SIN(angle);
218 cosCache[i] = COS(angle);
219 }
220
221 if (needCache3) {
222 for (i = 0; i < slices; i++) {
223 angle = 2 * PI * (i-0.5) / slices;
224 if (qobj->orientation == GLU_OUTSIDE) {
225 sinCache3[i] = xyNormalRatio * SIN(angle);
226 cosCache3[i] = xyNormalRatio * COS(angle);
227 } else {
228 sinCache3[i] = -xyNormalRatio * SIN(angle);
229 cosCache3[i] = -xyNormalRatio * COS(angle);
230 }
231 }
232 }
233
234 sinCache[slices] = sinCache[0];
235 cosCache[slices] = cosCache[0];
236 if (needCache2) {
237 sinCache2[slices] = sinCache2[0];
238 cosCache2[slices] = cosCache2[0];
239 }
240 if (needCache3) {
241 sinCache3[slices] = sinCache3[0];
242 cosCache3[slices] = cosCache3[0];
243 }
244
245 switch (qobj->drawStyle) {
246 case GLU_FILL:
247 /* Note:
248 ** An argument could be made for using a TRIANGLE_FAN for the end
249 ** of the cylinder of either radii is 0.0 (a cone). However, a
250 ** TRIANGLE_FAN would not work in smooth shading mode (the common
251 ** case) because the normal for the apex is different for every
252 ** triangle (and TRIANGLE_FAN doesn't let me respecify that normal).
253 ** Now, my choice is GL_TRIANGLES, or leave the GL_QUAD_STRIP and
254 ** just let the GL trivially reject one of the two triangles of the
255 ** QUAD. GL_QUAD_STRIP is probably faster, so I will leave this code
256 ** alone.
257 */
258 for (j = 0; j < stacks; j++) {
259 zLow = j * height / stacks;
260 zHigh = (j + 1) * height / stacks;
261 radiusLow = baseRadius - deltaRadius * ((float) j / stacks);
262 radiusHigh = baseRadius - deltaRadius * ((float) (j + 1) / stacks);
263
265 for (i = 0; i <= slices; i++) {
266 switch(qobj->normals) {
267 case GLU_FLAT:
268 glNormal3f(sinCache3[i], cosCache3[i], zNormal);
269 break;
270 case GLU_SMOOTH:
271 glNormal3f(sinCache2[i], cosCache2[i], zNormal);
272 break;
273 case GLU_NONE:
274 default:
275 break;
276 }
277 if (qobj->orientation == GLU_OUTSIDE) {
278 if (qobj->textureCoords) {
279 glTexCoord2f(1 - (float) i / slices,
280 (float) j / stacks);
281 }
282 glVertex3f(radiusLow * sinCache[i],
283 radiusLow * cosCache[i], zLow);
284 if (qobj->textureCoords) {
285 glTexCoord2f(1 - (float) i / slices,
286 (float) (j+1) / stacks);
287 }
288 glVertex3f(radiusHigh * sinCache[i],
289 radiusHigh * cosCache[i], zHigh);
290 } else {
291 if (qobj->textureCoords) {
292 glTexCoord2f(1 - (float) i / slices,
293 (float) (j+1) / stacks);
294 }
295 glVertex3f(radiusHigh * sinCache[i],
296 radiusHigh * cosCache[i], zHigh);
297 if (qobj->textureCoords) {
298 glTexCoord2f(1 - (float) i / slices,
299 (float) j / stacks);
300 }
301 glVertex3f(radiusLow * sinCache[i],
302 radiusLow * cosCache[i], zLow);
303 }
304 }
305 glEnd();
306 }
307 break;
308 case GLU_POINT:
310 for (i = 0; i < slices; i++) {
311 switch(qobj->normals) {
312 case GLU_FLAT:
313 case GLU_SMOOTH:
314 glNormal3f(sinCache2[i], cosCache2[i], zNormal);
315 break;
316 case GLU_NONE:
317 default:
318 break;
319 }
320 sintemp = sinCache[i];
321 costemp = cosCache[i];
322 for (j = 0; j <= stacks; j++) {
323 zLow = j * height / stacks;
324 radiusLow = baseRadius - deltaRadius * ((float) j / stacks);
325
326 if (qobj->textureCoords) {
327 glTexCoord2f(1 - (float) i / slices,
328 (float) j / stacks);
329 }
330 glVertex3f(radiusLow * sintemp,
331 radiusLow * costemp, zLow);
332 }
333 }
334 glEnd();
335 break;
336 case GLU_LINE:
337 for (j = 1; j < stacks; j++) {
338 zLow = j * height / stacks;
339 radiusLow = baseRadius - deltaRadius * ((float) j / stacks);
340
342 for (i = 0; i <= slices; i++) {
343 switch(qobj->normals) {
344 case GLU_FLAT:
345 glNormal3f(sinCache3[i], cosCache3[i], zNormal);
346 break;
347 case GLU_SMOOTH:
348 glNormal3f(sinCache2[i], cosCache2[i], zNormal);
349 break;
350 case GLU_NONE:
351 default:
352 break;
353 }
354 if (qobj->textureCoords) {
355 glTexCoord2f(1 - (float) i / slices,
356 (float) j / stacks);
357 }
358 glVertex3f(radiusLow * sinCache[i],
359 radiusLow * cosCache[i], zLow);
360 }
361 glEnd();
362 }
363 /* Intentionally fall through here... */
364 case GLU_SILHOUETTE:
365 for (j = 0; j <= stacks; j += stacks) {
366 zLow = j * height / stacks;
367 radiusLow = baseRadius - deltaRadius * ((float) j / stacks);
368
370 for (i = 0; i <= slices; i++) {
371 switch(qobj->normals) {
372 case GLU_FLAT:
373 glNormal3f(sinCache3[i], cosCache3[i], zNormal);
374 break;
375 case GLU_SMOOTH:
376 glNormal3f(sinCache2[i], cosCache2[i], zNormal);
377 break;
378 case GLU_NONE:
379 default:
380 break;
381 }
382 if (qobj->textureCoords) {
383 glTexCoord2f(1 - (float) i / slices,
384 (float) j / stacks);
385 }
386 glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i],
387 zLow);
388 }
389 glEnd();
390 }
391 for (i = 0; i < slices; i++) {
392 switch(qobj->normals) {
393 case GLU_FLAT:
394 case GLU_SMOOTH:
395 glNormal3f(sinCache2[i], cosCache2[i], 0.0);
396 break;
397 case GLU_NONE:
398 default:
399 break;
400 }
401 sintemp = sinCache[i];
402 costemp = cosCache[i];
404 for (j = 0; j <= stacks; j++) {
405 zLow = j * height / stacks;
406 radiusLow = baseRadius - deltaRadius * ((float) j / stacks);
407
408 if (qobj->textureCoords) {
409 glTexCoord2f(1 - (float) i / slices,
410 (float) j / stacks);
411 }
412 glVertex3f(radiusLow * sintemp,
413 radiusLow * costemp, zLow);
414 }
415 glEnd();
416 }
417 break;
418 default:
419 break;
420 }
421}
#define GLU_OUTSIDE
Definition: glu.h:210
#define GLU_POINT
Definition: glu.h:196
#define GLU_SMOOTH
Definition: glu.h:205
#define GLU_FLAT
Definition: glu.h:206
#define GLU_NONE
Definition: glu.h:207
#define GLU_SILHOUETTE
Definition: glu.h:199
#define GLU_LINE
Definition: glu.h:197
#define GLU_FILL
Definition: glu.h:198
GLAPI void GLAPIENTRY glTexCoord2f(GLfloat s, GLfloat t)
float GLfloat
Definition: gl.h:161
#define GL_LINE_STRIP
Definition: gl.h:193
#define GL_POINTS
Definition: gl.h:190
GLAPI void GLAPIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
GLAPI void GLAPIENTRY glBegin(GLenum mode)
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glEnd(void)
#define GL_QUAD_STRIP
Definition: gl.h:198
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLfloat angle
Definition: glext.h:10853
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define SQRT
Definition: gluint.h:45
#define SIN
Definition: gluint.h:44
#define COS
Definition: gluint.h:43
static float(__cdecl *square_half_float)(float x
static void gluQuadricError(GLUquadric *qobj, GLenum which)
Definition: quad.c:78
#define PI
Definition: quad.c:43
#define CACHE_SIZE
Definition: quad.c:40

◆ gluDeleteNurbsRenderer()

GLAPI void GLAPIENTRY gluDeleteNurbsRenderer ( GLUnurbs nurb)

Definition at line 75 of file glinterface.cc.

76{
77 delete r;
78}

◆ gluDeleteQuadric()

GLAPI void GLAPIENTRY gluDeleteQuadric ( GLUquadric quad)

Definition at line 73 of file quad.c.

74{
75 free(state);
76}
static int state
Definition: maze.c:121

◆ gluDeleteTess()

GLAPI void GLAPIENTRY gluDeleteTess ( GLUtesselator tess)

Definition at line 193 of file tess.c.

194{
195 RequireState( tess, T_DORMANT );
196 memFree( tess );
197}
#define memFree
Definition: memalloc.h:41
#define RequireState(tess, s)
Definition: tess.c:152
@ T_DORMANT
Definition: tess.h:47

◆ gluDisk()

GLAPI void GLAPIENTRY gluDisk ( GLUquadric quad,
GLdouble  inner,
GLdouble  outer,
GLint  slices,
GLint  loops 
)

Definition at line 424 of file quad.c.

426{
427 gluPartialDisk(qobj, innerRadius, outerRadius, slices, loops, 0.0, 360.0);
428}
#define gluPartialDisk
Definition: glu_mangle.h:46

◆ gluEndCurve()

GLAPI void GLAPIENTRY gluEndCurve ( GLUnurbs nurb)

Definition at line 105 of file glinterface.cc.

106{
107 r->endcurve();
108}

◆ gluEndPolygon()

GLAPI void GLAPIENTRY gluEndPolygon ( GLUtesselator tess)

Definition at line 628 of file tess.c.

629{
630 gluTessEndContour( tess );
631 gluTessEndPolygon( tess );
632}
#define gluTessEndPolygon
Definition: glu_mangle.h:67
#define gluTessEndContour
Definition: glu_mangle.h:68

◆ gluEndSurface()

GLAPI void GLAPIENTRY gluEndSurface ( GLUnurbs nurb)

Definition at line 111 of file glinterface.cc.

112{
113#ifdef DOWN_LOAD_NURBS
114if(surfcount == 1)
115 otn = OTN_make(1);
116OTN_insert(otn, tempNurb, tempTrim);
117if(surfcount >= 1)
118{
119#ifdef DEBUG
120printf("write file\n");
121#endif
122OTN_write(otn, "out.otn");
123
124}
125#endif
126
127 r->endsurface();
128}
#define printf
Definition: freeldr.h:94

◆ gluEndTrim()

GLAPI void GLAPIENTRY gluEndTrim ( GLUnurbs nurb)

Definition at line 141 of file glinterface.cc.

142{
143#ifdef DOWN_LOAD_NURBS
144OTL_endTrim(tempTrim);
145#endif
146 r->endtrim();
147}

◆ gluErrorString()

GLAPI const GLubyte *GLAPIENTRY gluErrorString ( GLenum  error)

Definition at line 67 of file error.c.

68{
69 int i;
70 for (i = 0; Errors[i].String; i++) {
71 if (Errors[i].Token == errorCode)
72 return (const GLubyte *) Errors[i].String;
73 }
74 if ((errorCode >= GLU_NURBS_ERROR1) && (errorCode <= GLU_NURBS_ERROR37)) {
75 return (const GLubyte *) __gluNURBSErrorString(errorCode - (GLU_NURBS_ERROR1 - 1));
76 }
77 if ((errorCode >= GLU_TESS_ERROR1) && (errorCode <= GLU_TESS_ERROR6)) {
78 return (const GLubyte *) __gluTessErrorString(errorCode - (GLU_TESS_ERROR1 - 1));
79 }
80 return (const GLubyte *) 0;
81}
#define GLU_NURBS_ERROR37
Definition: glu.h:164
#define GLU_TESS_ERROR1
Definition: glu.h:244
#define GLU_NURBS_ERROR1
Definition: glu.h:128
#define GLU_TESS_ERROR6
Definition: glu.h:249
static const struct token_string Errors[]
Definition: error.c:43
unsigned char GLubyte
Definition: gl.h:157
const unsigned char * __gluTessErrorString(int errnum)
Definition: glue.c:90
const unsigned char * __gluNURBSErrorString(int errnum)
Definition: glue.c:75

◆ gluGetNurbsProperty()

GLAPI void GLAPIENTRY gluGetNurbsProperty ( GLUnurbs nurb,
GLenum  property,
GLfloat data 
)

Definition at line 359 of file glinterface.cc.

360{
361 GLfloat nurbsValue;
362
363 switch(property) {
365 if (r->getautoloadmode()) {
366 *value = GL_TRUE;
367 } else {
368 *value = GL_FALSE;
369 }
370 break;
371 case GLU_CULLING:
372 r->getnurbsproperty(GL_MAP2_VERTEX_3, N_CULLING, &nurbsValue);
373 if (nurbsValue == N_CULLINGON) {
374 *value = GL_TRUE;
375 } else {
376 *value = GL_FALSE;
377 }
378 break;
380 r->getnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMETHOD, value);
381 if(*value == N_PATHLENGTH)
383 else if(*value == N_PARAMETRICDISTANCE)
385 else if(*value == N_DOMAINDISTANCE)
387 else if(*value == N_OBJECTSPACE_PATH)
389 else if(*value == N_OBJECTSPACE_PARA)
391 break;
393 r->getnurbsproperty(GL_MAP2_VERTEX_3, N_PIXEL_TOLERANCE, value);
394 break;
396 r->getnurbsproperty(GL_MAP2_VERTEX_3, N_ERROR_TOLERANCE, value);
397 break;
398
399 case GLU_U_STEP:
400 r->getnurbsproperty(GL_MAP2_VERTEX_3, N_S_STEPS, value);
401 break;
402 case GLU_V_STEP:
403 r->getnurbsproperty(GL_MAP2_VERTEX_3, N_T_STEPS, value);
404 break;
405 case GLU_DISPLAY_MODE:
406 r->getnurbsproperty(N_DISPLAY, &nurbsValue);
407 if (nurbsValue == N_FILL) {
408 *value = GLU_FILL;
409 } else if (nurbsValue == N_OUTLINE_POLY) {
411 } else {
413 }
414 break;
415
416 case GLU_NURBS_MODE:
417 if(r->is_callback())
419 else
421 break;
422
423 default:
424 r->postError(GLU_INVALID_ENUM);
425 return;
426 }
427}
#define GLU_PATH_LENGTH
Definition: glu.h:187
#define GLU_OUTLINE_PATCH
Definition: glu.h:97
#define GLU_AUTO_LOAD_MATRIX
Definition: glu.h:167
#define GLU_NURBS_RENDERER
Definition: glu.h:179
#define GLU_SAMPLING_TOLERANCE
Definition: glu.h:169
#define GLU_OBJECT_PARAMETRIC_ERROR
Definition: glu.h:183
#define GLU_OBJECT_PATH_LENGTH
Definition: glu.h:185
#define GLU_U_STEP
Definition: glu.h:173
#define GLU_DISPLAY_MODE
Definition: glu.h:170
#define GLU_DOMAIN_DISTANCE
Definition: glu.h:189
#define GLU_CULLING
Definition: glu.h:168
#define GLU_V_STEP
Definition: glu.h:174
#define GLU_NURBS_MODE
Definition: glu.h:175
#define GLU_OUTLINE_POLYGON
Definition: glu.h:96
#define GLU_PARAMETRIC_ERROR
Definition: glu.h:188
#define GLU_PARAMETRIC_TOLERANCE
Definition: glu.h:171
#define GLU_NURBS_TESSELLATOR
Definition: glu.h:177
#define GLU_SAMPLING_METHOD
Definition: glu.h:172
#define GL_MAP2_VERTEX_3
Definition: gl.h:567
#define N_CULLINGON
Definition: nurbsconsts.h:53
#define N_DISPLAY
Definition: nurbsconsts.h:70
#define N_PATHLENGTH
Definition: nurbsconsts.h:59
#define N_OUTLINE_POLY
Definition: nurbsconsts.h:72
#define N_S_STEPS
Definition: nurbsconsts.h:99
#define N_OBJECTSPACE_PARA
Definition: nurbsconsts.h:61
#define N_T_STEPS
Definition: nurbsconsts.h:100
#define N_OBJECTSPACE_PATH
Definition: nurbsconsts.h:62
#define N_PIXEL_TOLERANCE
Definition: nurbsconsts.h:89
#define N_FILL
Definition: nurbsconsts.h:71
#define N_PARAMETRICDISTANCE
Definition: nurbsconsts.h:58
#define N_ERROR_TOLERANCE
Definition: nurbsconsts.h:90
#define N_SAMPLINGMETHOD
Definition: nurbsconsts.h:54
#define N_DOMAINDISTANCE
Definition: nurbsconsts.h:57
#define N_CULLING
Definition: nurbsconsts.h:51
Definition: pdh_main.c:94

◆ gluGetString()

GLAPI const GLubyte *GLAPIENTRY gluGetString ( GLenum  name)

Definition at line 44 of file registry.c.

45{
46
47 if (name == GLU_VERSION) {
48 return versionString;
49 } else if (name == GLU_EXTENSIONS) {
50 return extensionString;
51 }
52 return NULL;
53}
#define GLU_EXTENSIONS
Definition: glu.h:85
#define GLU_VERSION
Definition: glu.h:84
static const GLubyte versionString[]
Definition: registry.c:37
static const GLubyte extensionString[]
Definition: registry.c:38
Definition: name.c:39

◆ gluGetTessProperty()

GLAPI void GLAPIENTRY gluGetTessProperty ( GLUtesselator tess,
GLenum  which,
GLdouble data 
)

Definition at line 240 of file tess.c.

241{
242 switch (which) {
244 /* tolerance should be in range [0..1] */
245 assert(0.0 <= tess->relTolerance && tess->relTolerance <= 1.0);
246 *value= tess->relTolerance;
247 break;
254 *value= tess->windingRule;
255 break;
257 assert(tess->boundaryOnly == TRUE || tess->boundaryOnly == FALSE);
258 *value= tess->boundaryOnly;
259 break;
260 default:
261 *value= 0.0;
263 break;
264 }
265} /* gluGetTessProperty() */
#define GLU_TESS_WINDING_NONZERO
Definition: glu.h:261
#define GLU_TESS_WINDING_POSITIVE
Definition: glu.h:262
#define GLU_TESS_BOUNDARY_ONLY
Definition: glu.h:240
#define GLU_TESS_WINDING_NEGATIVE
Definition: glu.h:263
#define GLU_TESS_WINDING_RULE
Definition: glu.h:239
#define GLU_TESS_TOLERANCE
Definition: glu.h:241
#define GLU_TESS_WINDING_ODD
Definition: glu.h:260
#define GLU_TESS_WINDING_ABS_GEQ_TWO
Definition: glu.h:264
#define assert(x)
Definition: debug.h:53
GLboolean boundaryOnly
Definition: tess.h:93
GLdouble relTolerance
Definition: tess.h:79
GLenum windingRule
Definition: tess.h:80
#define TRUE
Definition: tess.c:51
#define FALSE
Definition: tess.c:54
#define CALL_ERROR_OR_ERROR_DATA(a)
Definition: tess.h:160
static GLenum which
Definition: wgl_font.c:159

◆ gluLoadSamplingMatrices()

GLAPI void GLAPIENTRY gluLoadSamplingMatrices ( GLUnurbs nurb,
const GLfloat model,
const GLfloat perspective,
const GLint view 
)

◆ gluLookAt()

GLAPI void GLAPIENTRY gluLookAt ( GLdouble  eyeX,
GLdouble  eyeY,
GLdouble  eyeZ,
GLdouble  centerX,
GLdouble  centerY,
GLdouble  centerZ,
GLdouble  upX,
GLdouble  upY,
GLdouble  upZ 
)

Definition at line 108 of file project.c.

111{
112 float forward[3], side[3], up[3];
113 GLfloat m[4][4];
114
115 forward[0] = centerx - eyex;
116 forward[1] = centery - eyey;
117 forward[2] = centerz - eyez;
118
119 up[0] = upx;
120 up[1] = upy;
121 up[2] = upz;
122
123 normalize(forward);
124
125 /* Side = forward x up */
126 cross(forward, up, side);
127 normalize(side);
128
129 /* Recompute up as: up = side x forward */
130 cross(side, forward, up);
131
132 __gluMakeIdentityf(&m[0][0]);
133 m[0][0] = side[0];
134 m[1][0] = side[1];
135 m[2][0] = side[2];
136
137 m[0][1] = up[0];
138 m[1][1] = up[1];
139 m[2][1] = up[2];
140
141 m[0][2] = -forward[0];
142 m[1][2] = -forward[1];
143 m[2][2] = -forward[2];
144
145 glMultMatrixf(&m[0][0]);
146 glTranslated(-eyex, -eyey, -eyez);
147}
GLAPI void GLAPIENTRY glMultMatrixf(const GLfloat *m)
GLAPI void GLAPIENTRY glTranslated(GLdouble x, GLdouble y, GLdouble z)
const GLfloat * m
Definition: glext.h:10848
#define up(mutex)
Definition: glue.h:30
static void __gluMakeIdentityf(GLfloat m[16])
Definition: project.c:48
static void cross(float v1[3], float v2[3], float result[3])
Definition: project.c:100
static void normalize(float v[3])
Definition: project.c:88

◆ gluNewNurbsRenderer()

GLAPI GLUnurbs *GLAPIENTRY gluNewNurbsRenderer ( void  )

Definition at line 66 of file glinterface.cc.

67{
68 GLUnurbs *t;
69
70 t = new GLUnurbs();
71 return t;
72}
GLdouble GLdouble t
Definition: gl.h:2047

◆ gluNewQuadric()

GLAPI GLUquadric *GLAPIENTRY gluNewQuadric ( void  )

Definition at line 54 of file quad.c.

55{
56 GLUquadric *newstate;
57
58 newstate = (GLUquadric *) malloc(sizeof(GLUquadric));
59 if (newstate == NULL) {
60 /* Can't report an error at this point... */
61 return NULL;
62 }
63 newstate->normals = GLU_SMOOTH;
64 newstate->textureCoords = GL_FALSE;
65 newstate->orientation = GLU_OUTSIDE;
66 newstate->drawStyle = GLU_FILL;
67 newstate->errorCallback = NULL;
68 return newstate;
69}
GLint orientation
Definition: quad.c:48
GLint drawStyle
Definition: quad.c:49
GLint normals
Definition: quad.c:46
GLboolean textureCoords
Definition: quad.c:47

◆ gluNewTess()

GLAPI GLUtesselator *GLAPIENTRY gluNewTess ( void  )

Definition at line 92 of file tess.c.

93{
94 GLUtesselator *tess;
95
96 /* Only initialize fields which can be changed by the api. Other fields
97 * are initialized where they are used.
98 */
99
100 if (memInit( MAX_FAST_ALLOC ) == 0) {
101 return 0; /* out of memory */
102 }
103 tess = (GLUtesselator *)memAlloc( sizeof( GLUtesselator ));
104 if (tess == NULL) {
105 return 0; /* out of memory */
106 }
107
108 tess->state = T_DORMANT;
109
110 tess->normal[0] = 0;
111 tess->normal[1] = 0;
112 tess->normal[2] = 0;
113
116 tess->flagBoundary = FALSE;
117 tess->boundaryOnly = FALSE;
118
119 tess->callBegin = &noBegin;
120 tess->callEdgeFlag = &noEdgeFlag;
121 tess->callVertex = &noVertex;
122 tess->callEnd = &noEnd;
123
124 tess->callError = &noError;
125 tess->callCombine = &noCombine;
126 tess->callMesh = &noMesh;
127
128 tess->callBeginData= &__gl_noBeginData;
129 tess->callEdgeFlagData= &__gl_noEdgeFlagData;
130 tess->callVertexData= &__gl_noVertexData;
131 tess->callEndData= &__gl_noEndData;
132 tess->callErrorData= &__gl_noErrorData;
133 tess->callCombineData= &__gl_noCombineData;
134
135 tess->polygonData= NULL;
136
137 return tess;
138}
#define memAlloc
Definition: memalloc.h:48
#define memInit
Definition: memalloc.h:43
GLboolean flagBoundary
Definition: tess.h:92
enum TessState state
Definition: tess.h:63
GLdouble normal[3]
Definition: tess.h:73
void * polygonData
Definition: tess.h:111
void GLAPIENTRY __gl_noErrorData(GLenum errnum, void *polygonData)
Definition: tess.c:74
static void GLAPIENTRY noEdgeFlag(GLboolean boundaryEdge)
Definition: tess.c:58
void GLAPIENTRY __gl_noEdgeFlagData(GLboolean boundaryEdge, void *polygonData)
Definition: tess.c:69
#define MAX_FAST_ALLOC
Definition: tess.c:87
static void GLAPIENTRY noBegin(GLenum type)
Definition: tess.c:57
static void GLAPIENTRY noMesh(GLUmesh *mesh)
Definition: tess.c:64
void GLAPIENTRY __gl_noEndData(void *polygonData)
Definition: tess.c:73
#define GLU_TESS_DEFAULT_TOLERANCE
Definition: tess.c:47
void GLAPIENTRY __gl_noVertexData(void *data, void *polygonData)
Definition: tess.c:71
static void GLAPIENTRY noError(GLenum errnum)
Definition: tess.c:61
static void GLAPIENTRY noEnd(void)
Definition: tess.c:60
void GLAPIENTRY __gl_noCombineData(GLdouble coords[3], void *data[4], GLfloat weight[4], void **outData, void *polygonData)
Definition: tess.c:76
static void GLAPIENTRY noCombine(GLdouble coords[3], void *data[4], GLfloat weight[4], void **dataOut)
Definition: tess.c:62
static void GLAPIENTRY noVertex(void *data)
Definition: tess.c:59
void GLAPIENTRY __gl_noBeginData(GLenum type, void *polygonData)
Definition: tess.c:67

◆ gluNextContour()

GLAPI void GLAPIENTRY gluNextContour ( GLUtesselator tess,
GLenum  type 
)

Definition at line 620 of file tess.c.

621{
622 gluTessEndContour( tess );
623 gluTessBeginContour( tess );
624}

◆ gluNurbsCallback()

GLAPI void GLAPIENTRY gluNurbsCallback ( GLUnurbs nurb,
GLenum  which,
_GLUfuncptr  CallBackFunc 
)

Definition at line 430 of file glinterface.cc.

431{
432 switch (which) {
433 case GLU_NURBS_BEGIN:
434 case GLU_NURBS_END:
435 case GLU_NURBS_VERTEX:
436 case GLU_NURBS_NORMAL:
438 case GLU_NURBS_COLOR:
445 r->putSurfCallBack(which, fn);
446 break;
447
448 case GLU_NURBS_ERROR:
449 r->errorCallback = (void (APIENTRY *)( GLenum e )) fn;
450 break;
451 default:
452 r->postError(GLU_INVALID_ENUM);
453 return;
454 }
455}
#define GLU_NURBS_END
Definition: glu.h:112
#define GLU_NURBS_ERROR
Definition: glu.h:100
#define GLU_NURBS_NORMAL
Definition: glu.h:106
#define GLU_NURBS_COLOR
Definition: glu.h:108
#define GLU_NURBS_TEXTURE_COORD
Definition: glu.h:110
#define GLU_NURBS_VERTEX_DATA
Definition: glu.h:116
#define GLU_NURBS_TEXTURE_COORD_DATA
Definition: glu.h:122
#define GLU_NURBS_VERTEX
Definition: glu.h:104
#define GLU_NURBS_COLOR_DATA
Definition: glu.h:120
#define GLU_NURBS_BEGIN_DATA
Definition: glu.h:114
#define GLU_NURBS_END_DATA
Definition: glu.h:124
#define GLU_NURBS_BEGIN
Definition: glu.h:102
#define GLU_NURBS_NORMAL_DATA
Definition: glu.h:118
#define APIENTRY
Definition: api.h:79
unsigned int GLenum
Definition: gl.h:150
#define e
Definition: ke_i.h:82
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159

◆ gluNurbsCallbackData()

GLAPI void GLAPIENTRY gluNurbsCallbackData ( GLUnurbs nurb,
GLvoid userData 
)

Definition at line 466 of file glinterface.cc.

467{
468 gluNurbsCallbackDataEXT(r,userData);
469}
#define gluNurbsCallbackDataEXT
Definition: glu_mangle.h:84

◆ gluNurbsCallbackDataEXT()

GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT ( GLUnurbs nurb,
GLvoid userData 
)

Definition at line 459 of file glinterface.cc.

460{
461 r->setNurbsCallbackData(userData);
462}

◆ gluNurbsCurve()

GLAPI void GLAPIENTRY gluNurbsCurve ( GLUnurbs nurb,
GLint  knotCount,
GLfloat knots,
GLint  stride,
GLfloat control,
GLint  order,
GLenum  type 
)

◆ gluNurbsProperty()

GLAPI void GLAPIENTRY gluNurbsProperty ( GLUnurbs nurb,
GLenum  property,
GLfloat  value 
)

Definition at line 243 of file glinterface.cc.

244{
245 GLfloat nurbsValue;
246
247 switch (property) {
249 r->setautoloadmode(value);
250 return;
251
252 case GLU_CULLING:
253 if (value != 0.0) {
254 nurbsValue = N_CULLINGON;
255 } else {
256 nurbsValue = N_NOCULLING;
257 }
258 r->setnurbsproperty(GL_MAP2_VERTEX_3, N_CULLING, nurbsValue);
259 r->setnurbsproperty(GL_MAP2_VERTEX_4, N_CULLING, nurbsValue);
260 r->setnurbsproperty(GL_MAP1_VERTEX_3, N_CULLING, nurbsValue);
261 r->setnurbsproperty(GL_MAP1_VERTEX_4, N_CULLING, nurbsValue);
262 return;
263
265 if (value == GLU_PATH_LENGTH) {
266 nurbsValue = N_PATHLENGTH;
267 } else if (value == GLU_PARAMETRIC_ERROR) {
268 nurbsValue = N_PARAMETRICDISTANCE;
269 } else if (value == GLU_DOMAIN_DISTANCE) {
270 nurbsValue = N_DOMAINDISTANCE;
271 r->set_is_domain_distance_sampling(1); //optimzing untrimmed case
272
273 } else if (value == GLU_OBJECT_PARAMETRIC_ERROR) {
274 nurbsValue = N_OBJECTSPACE_PARA;
275 r->setautoloadmode( 0.0 );
276 r->setSamplingMatrixIdentity();
277 } else if (value == GLU_OBJECT_PATH_LENGTH) {
278 nurbsValue = N_OBJECTSPACE_PATH;
279 r->setautoloadmode( 0.0 );
280 r->setSamplingMatrixIdentity();
281 } else {
282 r->postError(GLU_INVALID_VALUE);
283 return;
284 }
285
286 r->setnurbsproperty(GL_MAP2_VERTEX_3, N_SAMPLINGMETHOD, nurbsValue);
287 r->setnurbsproperty(GL_MAP2_VERTEX_4, N_SAMPLINGMETHOD, nurbsValue);
288 r->setnurbsproperty(GL_MAP1_VERTEX_3, N_SAMPLINGMETHOD, nurbsValue);
289 r->setnurbsproperty(GL_MAP1_VERTEX_4, N_SAMPLINGMETHOD, nurbsValue);
290 return;
291
293 r->setnurbsproperty(GL_MAP2_VERTEX_3, N_PIXEL_TOLERANCE, value);
294 r->setnurbsproperty(GL_MAP2_VERTEX_4, N_PIXEL_TOLERANCE, value);
295 r->setnurbsproperty(GL_MAP1_VERTEX_3, N_PIXEL_TOLERANCE, value);
296 r->setnurbsproperty(GL_MAP1_VERTEX_4, N_PIXEL_TOLERANCE, value);
297 return;
298
300 r->setnurbsproperty(GL_MAP2_VERTEX_3, N_ERROR_TOLERANCE, value);
301 r->setnurbsproperty(GL_MAP2_VERTEX_4, N_ERROR_TOLERANCE, value);
302 r->setnurbsproperty(GL_MAP1_VERTEX_3, N_ERROR_TOLERANCE, value);
303 r->setnurbsproperty(GL_MAP1_VERTEX_4, N_ERROR_TOLERANCE, value);
304 return;
305
306
307 case GLU_DISPLAY_MODE:
308
309 if (value == GLU_FILL) {
310 nurbsValue = N_FILL;
311 } else if (value == GLU_OUTLINE_POLYGON) {
312 nurbsValue = N_OUTLINE_POLY;
313 } else if (value == GLU_OUTLINE_PATCH) {
314 nurbsValue = N_OUTLINE_PATCH;
315 } else {
316 r->postError(GLU_INVALID_VALUE);
317 return;
318 }
319 r->setnurbsproperty(N_DISPLAY, nurbsValue);
320
321 break;
322
323 case GLU_U_STEP:
324 r->setnurbsproperty(GL_MAP1_VERTEX_3, N_S_STEPS, value);
325 r->setnurbsproperty(GL_MAP1_VERTEX_4, N_S_STEPS, value);
326 r->setnurbsproperty(GL_MAP2_VERTEX_3, N_S_STEPS, value);
327 r->setnurbsproperty(GL_MAP2_VERTEX_4, N_S_STEPS, value);
328
329 //added for optimizing untrimmed case
330 r->set_domain_distance_u_rate(value);
331 break;
332
333 case GLU_V_STEP:
334 r->setnurbsproperty(GL_MAP1_VERTEX_3, N_T_STEPS, value);
335 r->setnurbsproperty(GL_MAP1_VERTEX_4, N_T_STEPS, value);
336 r->setnurbsproperty(GL_MAP2_VERTEX_3, N_T_STEPS, value);
337 r->setnurbsproperty(GL_MAP2_VERTEX_4, N_T_STEPS, value);
338
339 //added for optimizing untrimmed case
340 r->set_domain_distance_v_rate(value);
341 break;
342
343 case GLU_NURBS_MODE:
345 r->put_callbackFlag(0);
346 else if(value == GLU_NURBS_TESSELLATOR)
347 r->put_callbackFlag(1);
348 else
349 r->postError(GLU_INVALID_ENUM);
350 break;
351
352 default:
353 r->postError(GLU_INVALID_ENUM);
354 return;
355 }
356}
#define GL_MAP1_VERTEX_3
Definition: gl.h:558
#define GL_MAP2_VERTEX_4
Definition: gl.h:568
#define GL_MAP1_VERTEX_4
Definition: gl.h:559
#define N_OUTLINE_PATCH
Definition: nurbsconsts.h:75
#define N_NOCULLING
Definition: nurbsconsts.h:52

◆ gluNurbsSurface()

GLAPI void GLAPIENTRY gluNurbsSurface ( GLUnurbs nurb,
GLint  sKnotCount,
GLfloat sKnots,
GLint  tKnotCount,
GLfloat tKnots,
GLint  sStride,
GLint  tStride,
GLfloat control,
GLint  sOrder,
GLint  tOrder,
GLenum  type 
)

Definition at line 199 of file glinterface.cc.

204{
205#ifdef DOWN_LOAD_NURBS
206 {
207 int dimension;
208 switch(type){
209 case GL_MAP2_VERTEX_3:
210 dimension = 3;
211 break;
212 case GL_MAP2_VERTEX_4:
213 dimension = 4;
214 break;
215 default:
216 fprintf(stderr, "error in glinterface.c++, type no implemented\n");
217 exit(1);
218 }
219tempNurb = nurbSurfMake(sknot_count, sknot,
220 tknot_count, tknot,
221 sorder, torder,
222 dimension,
223 ctlarray,
224 s_stride, t_stride);
225
226 }
227#endif
228
229 r->nurbssurface(sknot_count, sknot, tknot_count, tknot,
230 sizeof(INREAL) * s_stride, sizeof(INREAL) * t_stride,
231 ctlarray, sorder, torder, type);
232}
#define INREAL
Definition: types.h:40
#define stderr
Definition: stdio.h:100
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
#define exit(n)
Definition: config.h:202

◆ gluOrtho2D()

GLAPI void GLAPIENTRY gluOrtho2D ( GLdouble  left,
GLdouble  right,
GLdouble  bottom,
GLdouble  top 
)

Definition at line 57 of file project.c.

58{
59 glOrtho(left, right, bottom, top, -1, 1);
60}
GLAPI void GLAPIENTRY glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val)
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726

◆ gluPartialDisk()

GLAPI void GLAPIENTRY gluPartialDisk ( GLUquadric quad,
GLdouble  inner,
GLdouble  outer,
GLint  slices,
GLint  loops,
GLdouble  start,
GLdouble  sweep 
)

Definition at line 431 of file quad.c.

434{
435 GLint i,j;
436 GLfloat sinCache[CACHE_SIZE];
437 GLfloat cosCache[CACHE_SIZE];
439 GLfloat sintemp, costemp;
440 GLfloat deltaRadius;
441 GLfloat radiusLow, radiusHigh;
442 GLfloat texLow = 0.0, texHigh = 0.0;
443 GLfloat angleOffset;
444 GLint slices2;
446
447 if (slices >= CACHE_SIZE) slices = CACHE_SIZE-1;
448 if (slices < 2 || loops < 1 || outerRadius <= 0.0 || innerRadius < 0.0 ||
449 innerRadius > outerRadius) {
451 return;
452 }
453
454 if (sweepAngle < -360.0) sweepAngle = 360.0;
455 if (sweepAngle > 360.0) sweepAngle = 360.0;
456 if (sweepAngle < 0) {
457 startAngle += sweepAngle;
458 sweepAngle = -sweepAngle;
459 }
460
461 if (sweepAngle == 360.0) {
462 slices2 = slices;
463 } else {
464 slices2 = slices + 1;
465 }
466
467 /* Compute length (needed for normal calculations) */
468 deltaRadius = outerRadius - innerRadius;
469
470 /* Cache is the vertex locations cache */
471
472 angleOffset = startAngle / 180.0 * PI;
473 for (i = 0; i <= slices; i++) {
474 angle = angleOffset + ((PI * sweepAngle) / 180.0) * i / slices;
475 sinCache[i] = SIN(angle);
476 cosCache[i] = COS(angle);
477 }
478
479 if (sweepAngle == 360.0) {
480 sinCache[slices] = sinCache[0];
481 cosCache[slices] = cosCache[0];
482 }
483
484 switch(qobj->normals) {
485 case GLU_FLAT:
486 case GLU_SMOOTH:
487 if (qobj->orientation == GLU_OUTSIDE) {
488 glNormal3f(0.0, 0.0, 1.0);
489 } else {
490 glNormal3f(0.0, 0.0, -1.0);
491 }
492 break;
493 default:
494 case GLU_NONE:
495 break;
496 }
497
498 switch (qobj->drawStyle) {
499 case GLU_FILL:
500 if (innerRadius == 0.0) {
501 finish = loops - 1;
502 /* Triangle strip for inner polygons */
504 if (qobj->textureCoords) {
505 glTexCoord2f(0.5, 0.5);
506 }
507 glVertex3f(0.0, 0.0, 0.0);
508 radiusLow = outerRadius -
509 deltaRadius * ((float) (loops-1) / loops);
510 if (qobj->textureCoords) {
511 texLow = radiusLow / outerRadius / 2;
512 }
513
514 if (qobj->orientation == GLU_OUTSIDE) {
515 for (i = slices; i >= 0; i--) {
516 if (qobj->textureCoords) {
517 glTexCoord2f(texLow * sinCache[i] + 0.5,
518 texLow * cosCache[i] + 0.5);
519 }
520 glVertex3f(radiusLow * sinCache[i],
521 radiusLow * cosCache[i], 0.0);
522 }
523 } else {
524 for (i = 0; i <= slices; i++) {
525 if (qobj->textureCoords) {
526 glTexCoord2f(texLow * sinCache[i] + 0.5,
527 texLow * cosCache[i] + 0.5);
528 }
529 glVertex3f(radiusLow * sinCache[i],
530 radiusLow * cosCache[i], 0.0);
531 }
532 }
533 glEnd();
534 } else {
535 finish = loops;
536 }
537 for (j = 0; j < finish; j++) {
538 radiusLow = outerRadius - deltaRadius * ((float) j / loops);
539 radiusHigh = outerRadius - deltaRadius * ((float) (j + 1) / loops);
540 if (qobj->textureCoords) {
541 texLow = radiusLow / outerRadius / 2;
542 texHigh = radiusHigh / outerRadius / 2;
543 }
544
546 for (i = 0; i <= slices; i++) {
547 if (qobj->orientation == GLU_OUTSIDE) {
548 if (qobj->textureCoords) {
549 glTexCoord2f(texLow * sinCache[i] + 0.5,
550 texLow * cosCache[i] + 0.5);
551 }
552 glVertex3f(radiusLow * sinCache[i],
553 radiusLow * cosCache[i], 0.0);
554
555 if (qobj->textureCoords) {
556 glTexCoord2f(texHigh * sinCache[i] + 0.5,
557 texHigh * cosCache[i] + 0.5);
558 }
559 glVertex3f(radiusHigh * sinCache[i],
560 radiusHigh * cosCache[i], 0.0);
561 } else {
562 if (qobj->textureCoords) {
563 glTexCoord2f(texHigh * sinCache[i] + 0.5,
564 texHigh * cosCache[i] + 0.5);
565 }
566 glVertex3f(radiusHigh * sinCache[i],
567 radiusHigh * cosCache[i], 0.0);
568
569 if (qobj->textureCoords) {
570 glTexCoord2f(texLow * sinCache[i] + 0.5,
571 texLow * cosCache[i] + 0.5);
572 }
573 glVertex3f(radiusLow * sinCache[i],
574 radiusLow * cosCache[i], 0.0);
575 }
576 }
577 glEnd();
578 }
579 break;
580 case GLU_POINT:
582 for (i = 0; i < slices2; i++) {
583 sintemp = sinCache[i];
584 costemp = cosCache[i];
585 for (j = 0; j <= loops; j++) {
586 radiusLow = outerRadius - deltaRadius * ((float) j / loops);
587
588 if (qobj->textureCoords) {
589 texLow = radiusLow / outerRadius / 2;
590
591 glTexCoord2f(texLow * sinCache[i] + 0.5,
592 texLow * cosCache[i] + 0.5);
593 }
594 glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0);
595 }
596 }
597 glEnd();
598 break;
599 case GLU_LINE:
600 if (innerRadius == outerRadius) {
602
603 for (i = 0; i <= slices; i++) {
604 if (qobj->textureCoords) {
605 glTexCoord2f(sinCache[i] / 2 + 0.5,
606 cosCache[i] / 2 + 0.5);
607 }
608 glVertex3f(innerRadius * sinCache[i],
609 innerRadius * cosCache[i], 0.0);
610 }
611 glEnd();
612 break;
613 }
614 for (j = 0; j <= loops; j++) {
615 radiusLow = outerRadius - deltaRadius * ((float) j / loops);
616 if (qobj->textureCoords) {
617 texLow = radiusLow / outerRadius / 2;
618 }
619
621 for (i = 0; i <= slices; i++) {
622 if (qobj->textureCoords) {
623 glTexCoord2f(texLow * sinCache[i] + 0.5,
624 texLow * cosCache[i] + 0.5);
625 }
626 glVertex3f(radiusLow * sinCache[i],
627 radiusLow * cosCache[i], 0.0);
628 }
629 glEnd();
630 }
631 for (i=0; i < slices2; i++) {
632 sintemp = sinCache[i];
633 costemp = cosCache[i];
635 for (j = 0; j <= loops; j++) {
636 radiusLow = outerRadius - deltaRadius * ((float) j / loops);
637 if (qobj->textureCoords) {
638 texLow = radiusLow / outerRadius / 2;
639 }
640
641 if (qobj->textureCoords) {
642 glTexCoord2f(texLow * sinCache[i] + 0.5,
643 texLow * cosCache[i] + 0.5);
644 }
645 glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0);
646 }
647 glEnd();
648 }
649 break;
650 case GLU_SILHOUETTE:
651 if (sweepAngle < 360.0) {
652 for (i = 0; i <= slices; i+= slices) {
653 sintemp = sinCache[i];
654 costemp = cosCache[i];
656 for (j = 0; j <= loops; j++) {
657 radiusLow = outerRadius - deltaRadius * ((float) j / loops);
658
659 if (qobj->textureCoords) {
660 texLow = radiusLow / outerRadius / 2;
661 glTexCoord2f(texLow * sinCache[i] + 0.5,
662 texLow * cosCache[i] + 0.5);
663 }
664 glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0);
665 }
666 glEnd();
667 }
668 }
669 for (j = 0; j <= loops; j += loops) {
670 radiusLow = outerRadius - deltaRadius * ((float) j / loops);
671 if (qobj->textureCoords) {
672 texLow = radiusLow / outerRadius / 2;
673 }
674
676 for (i = 0; i <= slices; i++) {
677 if (qobj->textureCoords) {
678 glTexCoord2f(texLow * sinCache[i] + 0.5,
679 texLow * cosCache[i] + 0.5);
680 }
681 glVertex3f(radiusLow * sinCache[i],
682 radiusLow * cosCache[i], 0.0);
683 }
684 glEnd();
685 if (innerRadius == outerRadius) break;
686 }
687 break;
688 default:
689 break;
690 }
691}
#define GL_TRIANGLE_FAN
Definition: gl.h:196
#define finish()
Definition: seh0024.c:15

◆ gluPerspective()

GLAPI void GLAPIENTRY gluPerspective ( GLdouble  fovy,
GLdouble  aspect,
GLdouble  zNear,
GLdouble  zFar 
)

Definition at line 65 of file project.c.

66{
67 GLdouble m[4][4];
68 double sine, cotangent, deltaZ;
69 double radians = fovy / 2 * __glPi / 180;
70
71 deltaZ = zFar - zNear;
72 sine = sin(radians);
73 if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) {
74 return;
75 }
76 cotangent = COS(radians) / sine;
77
78 __gluMakeIdentityd(&m[0][0]);
79 m[0][0] = cotangent / aspect;
80 m[1][1] = cotangent;
81 m[2][2] = -(zFar + zNear) / deltaZ;
82 m[2][3] = -1;
83 m[3][2] = -2 * zNear * zFar / deltaZ;
84 m[3][3] = 0;
85 glMultMatrixd(&m[0][0]);
86}
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
double GLdouble
Definition: gl.h:163
GLAPI void GLAPIENTRY glMultMatrixd(const GLdouble *m)
GLdouble GLdouble GLdouble GLdouble GLdouble zNear
Definition: glext.h:10859
GLdouble zFar
Definition: glext.h:10465
#define __glPi
Definition: project.c:62
static void __gluMakeIdentityd(GLdouble m[16])
Definition: project.c:40

◆ gluPickMatrix()

GLAPI void GLAPIENTRY gluPickMatrix ( GLdouble  x,
GLdouble  y,
GLdouble  delX,
GLdouble  delY,
GLint viewport 
)

◆ gluProject()

GLAPI GLint GLAPIENTRY gluProject ( GLdouble  objX,
GLdouble  objY,
GLdouble  objZ,
const GLdouble model,
const GLdouble proj,
const GLint view,
GLdouble winX,
GLdouble winY,
GLdouble winZ 
)

◆ gluPwlCurve()

GLAPI void GLAPIENTRY gluPwlCurve ( GLUnurbs nurb,
GLint  count,
GLfloat data,
GLint  stride,
GLenum  type 
)

◆ gluQuadricCallback()

GLAPI void GLAPIENTRY gluQuadricCallback ( GLUquadric quad,
GLenum  which,
_GLUfuncptr  CallBackFunc 
)

Definition at line 86 of file quad.c.

87{
88 switch (which) {
89 case GLU_ERROR:
90 qobj->errorCallback = (void (GLAPIENTRY *)(GLint)) fn;
91 break;
92 default:
94 return;
95 }
96}
#define GLAPIENTRY
Definition: glu.h:44
#define GLU_ERROR
Definition: glu.h:101

◆ gluQuadricDrawStyle()

GLAPI void GLAPIENTRY gluQuadricDrawStyle ( GLUquadric quad,
GLenum  draw 
)

Definition at line 134 of file quad.c.

135{
136 switch(drawStyle) {
137 case GLU_POINT:
138 case GLU_LINE:
139 case GLU_FILL:
140 case GLU_SILHOUETTE:
141 break;
142 default:
144 return;
145 }
146 qobj->drawStyle = drawStyle;
147}

◆ gluQuadricNormals()

GLAPI void GLAPIENTRY gluQuadricNormals ( GLUquadric quad,
GLenum  normal 
)

Definition at line 99 of file quad.c.

100{
101 switch (normals) {
102 case GLU_SMOOTH:
103 case GLU_FLAT:
104 case GLU_NONE:
105 break;
106 default:
108 return;
109 }
110 qobj->normals = normals;
111}

◆ gluQuadricOrientation()

GLAPI void GLAPIENTRY gluQuadricOrientation ( GLUquadric quad,
GLenum  orientation 
)

Definition at line 120 of file quad.c.

121{
122 switch(orientation) {
123 case GLU_OUTSIDE:
124 case GLU_INSIDE:
125 break;
126 default:
128 return;
129 }
130 qobj->orientation = orientation;
131}
#define GLU_INSIDE
Definition: glu.h:211

◆ gluQuadricTexture()

GLAPI void GLAPIENTRY gluQuadricTexture ( GLUquadric quad,
GLboolean  texture 
)

Definition at line 114 of file quad.c.

115{
116 qobj->textureCoords = textureCoords;
117}

◆ gluScaleImage()

GLAPI GLint GLAPIENTRY gluScaleImage ( GLenum  format,
GLsizei  wIn,
GLsizei  hIn,
GLenum  typeIn,
const void dataIn,
GLsizei  wOut,
GLsizei  hOut,
GLenum  typeOut,
GLvoid dataOut 
)

Definition at line 3498 of file mipmap.c.

3502{
3503 int components;
3504 GLushort *beforeImage;
3505 GLushort *afterImage;
3507
3508 if (widthin == 0 || heightin == 0 || widthout == 0 || heightout == 0) {
3509 return 0;
3510 }
3511 if (widthin < 0 || heightin < 0 || widthout < 0 || heightout < 0) {
3512 return GLU_INVALID_VALUE;
3513 }
3514 if (!legalFormat(format) || !legalType(typein) || !legalType(typeout)) {
3515 return GLU_INVALID_ENUM;
3516 }
3518 return GLU_INVALID_OPERATION;
3519 }
3520 if (!isLegalFormatForPackedPixelType(format, typeout)) {
3521 return GLU_INVALID_OPERATION;
3522 }
3523 beforeImage =
3524 malloc(image_size(widthin, heightin, format, GL_UNSIGNED_SHORT));
3525 afterImage =
3526 malloc(image_size(widthout, heightout, format, GL_UNSIGNED_SHORT));
3527 if (beforeImage == NULL || afterImage == NULL) {
3528 free(beforeImage);
3529 free(afterImage);
3530 return GLU_OUT_OF_MEMORY;
3531 }
3532
3533 retrieveStoreModes(&psm);
3534 fill_image(&psm,widthin, heightin, format, typein, is_index(format),
3535 datain, beforeImage);
3537 scale_internal(components, widthin, heightin, beforeImage,
3538 widthout, heightout, afterImage);
3539 empty_image(&psm,widthout, heightout, format, typeout,
3540 is_index(format), afterImage, dataout);
3541 free((GLbyte *) beforeImage);
3542 free((GLbyte *) afterImage);
3543
3544 return 0;
3545}
#define GLU_INVALID_OPERATION
Definition: glu.h:92
#define GLU_OUT_OF_MEMORY
Definition: glu.h:90
signed char GLbyte
Definition: gl.h:154
#define GL_UNSIGNED_SHORT
Definition: gl.h:180
unsigned short GLushort
Definition: gl.h:158
GLenum GLenum GLuint components
Definition: glext.h:9620
static void scale_internal(GLint components, GLint widthin, GLint heightin, const GLushort *datain, GLint widthout, GLint heightout, GLushort *dataout)
Definition: mipmap.c:1289
static GLint elements_per_group(GLenum format, GLenum type)
Definition: mipmap.c:4770
static GLboolean isLegalFormatForPackedPixelType(GLenum, GLenum)
Definition: mipmap.c:3361
static GLint is_index(GLenum format)
Definition: mipmap.c:4849
static void fill_image(const PixelStorageModes *, GLint width, GLint height, GLenum format, GLenum type, GLboolean index_format, const void *userdata, GLushort *newimage)
Definition: mipmap.c:4878
static GLboolean legalFormat(GLenum)
Definition: mipmap.c:3286
static void retrieveStoreModes(PixelStorageModes *psm)
Definition: mipmap.c:249
static GLboolean legalType(GLenum)
Definition: mipmap.c:3309
static void empty_image(const PixelStorageModes *, GLint width, GLint height, GLenum format, GLenum type, GLboolean index_format, const GLushort *oldimage, void *userdata)
Definition: mipmap.c:5141
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
Definition: mipmap.c:4858

◆ gluSphere()

GLAPI void GLAPIENTRY gluSphere ( GLUquadric quad,
GLdouble  radius,
GLint  slices,
GLint  stacks 
)

Definition at line 694 of file quad.c.

695{
696 GLint i,j;
697 GLfloat sinCache1a[CACHE_SIZE];
698 GLfloat cosCache1a[CACHE_SIZE];
699 GLfloat sinCache2a[CACHE_SIZE];
700 GLfloat cosCache2a[CACHE_SIZE];
701 GLfloat sinCache3a[CACHE_SIZE];
702 GLfloat cosCache3a[CACHE_SIZE];
703 GLfloat sinCache1b[CACHE_SIZE];
704 GLfloat cosCache1b[CACHE_SIZE];
705 GLfloat sinCache2b[CACHE_SIZE];
706 GLfloat cosCache2b[CACHE_SIZE];
707 GLfloat sinCache3b[CACHE_SIZE];
708 GLfloat cosCache3b[CACHE_SIZE];
710 GLfloat zLow, zHigh;
711 GLfloat sintemp1 = 0.0, sintemp2 = 0.0, sintemp3 = 0.0, sintemp4 = 0.0;
712 GLfloat costemp1 = 0.0, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
713 GLboolean needCache2, needCache3;
715
716 if (slices >= CACHE_SIZE) slices = CACHE_SIZE-1;
717 if (stacks >= CACHE_SIZE) stacks = CACHE_SIZE-1;
718 if (slices < 2 || stacks < 1 || radius < 0.0) {
720 return;
721 }
722
723 /* Cache is the vertex locations cache */
724 /* Cache2 is the various normals at the vertices themselves */
725 /* Cache3 is the various normals for the faces */
726 needCache2 = needCache3 = GL_FALSE;
727
728 if (qobj->normals == GLU_SMOOTH) {
729 needCache2 = GL_TRUE;
730 }
731
732 if (qobj->normals == GLU_FLAT) {
733 if (qobj->drawStyle != GLU_POINT) {
734 needCache3 = GL_TRUE;
735 }
736 if (qobj->drawStyle == GLU_LINE) {
737 needCache2 = GL_TRUE;
738 }
739 }
740
741 for (i = 0; i < slices; i++) {
742 angle = 2 * PI * i / slices;
743 sinCache1a[i] = SIN(angle);
744 cosCache1a[i] = COS(angle);
745 if (needCache2) {
746 sinCache2a[i] = sinCache1a[i];
747 cosCache2a[i] = cosCache1a[i];
748 }
749 }
750
751 for (j = 0; j <= stacks; j++) {
752 angle = PI * j / stacks;
753 if (needCache2) {
754 if (qobj->orientation == GLU_OUTSIDE) {
755 sinCache2b[j] = SIN(angle);
756 cosCache2b[j] = COS(angle);
757 } else {
758 sinCache2b[j] = -SIN(angle);
759 cosCache2b[j] = -COS(angle);
760 }
761 }
762 sinCache1b[j] = radius * SIN(angle);
763 cosCache1b[j] = radius * COS(angle);
764 }
765 /* Make sure it comes to a point */
766 sinCache1b[0] = 0;
767 sinCache1b[stacks] = 0;
768
769 if (needCache3) {
770 for (i = 0; i < slices; i++) {
771 angle = 2 * PI * (i-0.5) / slices;
772 sinCache3a[i] = SIN(angle);
773 cosCache3a[i] = COS(angle);
774 }
775 for (j = 0; j <= stacks; j++) {
776 angle = PI * (j - 0.5) / stacks;
777 if (qobj->orientation == GLU_OUTSIDE) {
778 sinCache3b[j] = SIN(angle);
779 cosCache3b[j] = COS(angle);
780 } else {
781 sinCache3b[j] = -SIN(angle);
782 cosCache3b[j] = -COS(angle);
783 }
784 }
785 }
786
787 sinCache1a[slices] = sinCache1a[0];
788 cosCache1a[slices] = cosCache1a[0];
789 if (needCache2) {
790 sinCache2a[slices] = sinCache2a[0];
791 cosCache2a[slices] = cosCache2a[0];
792 }
793 if (needCache3) {
794 sinCache3a[slices] = sinCache3a[0];
795 cosCache3a[slices] = cosCache3a[0];
796 }
797
798 switch (qobj->drawStyle) {
799 case GLU_FILL:
800 /* Do ends of sphere as TRIANGLE_FAN's (if not texturing)
801 ** We don't do it when texturing because we need to respecify the
802 ** texture coordinates of the apex for every adjacent vertex (because
803 ** it isn't a constant for that point)
804 */
805 if (!(qobj->textureCoords)) {
806 start = 1;
807 finish = stacks - 1;
808
809 /* Low end first (j == 0 iteration) */
810 sintemp2 = sinCache1b[1];
811 zHigh = cosCache1b[1];
812 switch(qobj->normals) {
813 case GLU_FLAT:
814 sintemp3 = sinCache3b[1];
815 costemp3 = cosCache3b[1];
816 break;
817 case GLU_SMOOTH:
818 sintemp3 = sinCache2b[1];
819 costemp3 = cosCache2b[1];
820 glNormal3f(sinCache2a[0] * sinCache2b[0],
821 cosCache2a[0] * sinCache2b[0],
822 cosCache2b[0]);
823 break;
824 default:
825 break;
826 }
828 glVertex3f(0.0, 0.0, radius);
829 if (qobj->orientation == GLU_OUTSIDE) {
830 for (i = slices; i >= 0; i--) {
831 switch(qobj->normals) {
832 case GLU_SMOOTH:
833 glNormal3f(sinCache2a[i] * sintemp3,
834 cosCache2a[i] * sintemp3,
835 costemp3);
836 break;
837 case GLU_FLAT:
838 if (i != slices) {
839 glNormal3f(sinCache3a[i+1] * sintemp3,
840 cosCache3a[i+1] * sintemp3,
841 costemp3);
842 }
843 break;
844 case GLU_NONE:
845 default:
846 break;
847 }
848 glVertex3f(sintemp2 * sinCache1a[i],
849 sintemp2 * cosCache1a[i], zHigh);
850 }
851 } else {
852 for (i = 0; i <= slices; i++) {
853 switch(qobj->normals) {
854 case GLU_SMOOTH:
855 glNormal3f(sinCache2a[i] * sintemp3,
856 cosCache2a[i] * sintemp3,
857 costemp3);
858 break;
859 case GLU_FLAT:
860 glNormal3f(sinCache3a[i] * sintemp3,
861 cosCache3a[i] * sintemp3,
862 costemp3);
863 break;
864 case GLU_NONE:
865 default:
866 break;
867 }
868 glVertex3f(sintemp2 * sinCache1a[i],
869 sintemp2 * cosCache1a[i], zHigh);
870 }
871 }
872 glEnd();
873
874 /* High end next (j == stacks-1 iteration) */
875 sintemp2 = sinCache1b[stacks-1];
876 zHigh = cosCache1b[stacks-1];
877 switch(qobj->normals) {
878 case GLU_FLAT:
879 sintemp3 = sinCache3b[stacks];
880 costemp3 = cosCache3b[stacks];
881 break;
882 case GLU_SMOOTH:
883 sintemp3 = sinCache2b[stacks-1];
884 costemp3 = cosCache2b[stacks-1];
885 glNormal3f(sinCache2a[stacks] * sinCache2b[stacks],
886 cosCache2a[stacks] * sinCache2b[stacks],
887 cosCache2b[stacks]);
888 break;
889 default:
890 break;
891 }
893 glVertex3f(0.0, 0.0, -radius);
894 if (qobj->orientation == GLU_OUTSIDE) {
895 for (i = 0; i <= slices; i++) {
896 switch(qobj->normals) {
897 case GLU_SMOOTH:
898 glNormal3f(sinCache2a[i] * sintemp3,
899 cosCache2a[i] * sintemp3,
900 costemp3);
901 break;
902 case GLU_FLAT:
903 glNormal3f(sinCache3a[i] * sintemp3,
904 cosCache3a[i] * sintemp3,
905 costemp3);
906 break;
907 case GLU_NONE:
908 default:
909 break;
910 }
911 glVertex3f(sintemp2 * sinCache1a[i],
912 sintemp2 * cosCache1a[i], zHigh);
913 }
914 } else {
915 for (i = slices; i >= 0; i--) {
916 switch(qobj->normals) {
917 case GLU_SMOOTH:
918 glNormal3f(sinCache2a[i] * sintemp3,
919 cosCache2a[i] * sintemp3,
920 costemp3);
921 break;
922 case GLU_FLAT:
923 if (i != slices) {
924 glNormal3f(sinCache3a[i+1] * sintemp3,
925 cosCache3a[i+1] * sintemp3,
926 costemp3);
927 }
928 break;
929 case GLU_NONE:
930 default:
931 break;
932 }
933 glVertex3f(sintemp2 * sinCache1a[i],
934 sintemp2 * cosCache1a[i], zHigh);
935 }
936 }
937 glEnd();
938 } else {
939 start = 0;
940 finish = stacks;
941 }
942 for (j = start; j < finish; j++) {
943 zLow = cosCache1b[j];
944 zHigh = cosCache1b[j+1];
945 sintemp1 = sinCache1b[j];
946 sintemp2 = sinCache1b[j+1];
947 switch(qobj->normals) {
948 case GLU_FLAT:
949 sintemp4 = sinCache3b[j+1];
950 costemp4 = cosCache3b[j+1];
951 break;
952 case GLU_SMOOTH:
953 if (qobj->orientation == GLU_OUTSIDE) {
954 sintemp3 = sinCache2b[j+1];
955 costemp3 = cosCache2b[j+1];
956 sintemp4 = sinCache2b[j];
957 costemp4 = cosCache2b[j];
958 } else {
959 sintemp3 = sinCache2b[j];
960 costemp3 = cosCache2b[j];
961 sintemp4 = sinCache2b[j+1];
962 costemp4 = cosCache2b[j+1];
963 }
964 break;
965 default:
966 break;
967 }
968
970 for (i = 0; i <= slices; i++) {
971 switch(qobj->normals) {
972 case GLU_SMOOTH:
973 glNormal3f(sinCache2a[i] * sintemp3,
974 cosCache2a[i] * sintemp3,
975 costemp3);
976 break;
977 case GLU_FLAT:
978 case GLU_NONE:
979 default:
980 break;
981 }
982 if (qobj->orientation == GLU_OUTSIDE) {
983 if (qobj->textureCoords) {
984 glTexCoord2f(1 - (float) i / slices,
985 1 - (float) (j+1) / stacks);
986 }
987 glVertex3f(sintemp2 * sinCache1a[i],
988 sintemp2 * cosCache1a[i], zHigh);
989 } else {
990 if (qobj->textureCoords) {
991 glTexCoord2f(1 - (float) i / slices,
992 1 - (float) j / stacks);
993 }
994 glVertex3f(sintemp1 * sinCache1a[i],
995 sintemp1 * cosCache1a[i], zLow);
996 }
997 switch(qobj->normals) {
998 case GLU_SMOOTH:
999 glNormal3f(sinCache2a[i] * sintemp4,
1000 cosCache2a[i] * sintemp4,
1001 costemp4);
1002 break;
1003 case GLU_FLAT:
1004 glNormal3f(sinCache3a[i] * sintemp4,
1005 cosCache3a[i] * sintemp4,
1006 costemp4);
1007 break;
1008 case GLU_NONE:
1009 default:
1010 break;
1011 }
1012 if (qobj->orientation == GLU_OUTSIDE) {
1013 if (qobj->textureCoords) {
1014 glTexCoord2f(1 - (float) i / slices,
1015 1 - (float) j / stacks);
1016 }
1017 glVertex3f(sintemp1 * sinCache1a[i],
1018 sintemp1 * cosCache1a[i], zLow);
1019 } else {
1020 if (qobj->textureCoords) {
1021 glTexCoord2f(1 - (float) i / slices,
1022 1 - (float) (j+1) / stacks);
1023 }
1024 glVertex3f(sintemp2 * sinCache1a[i],
1025 sintemp2 * cosCache1a[i], zHigh);
1026 }
1027 }
1028 glEnd();
1029 }
1030 break;
1031 case GLU_POINT:
1033 for (j = 0; j <= stacks; j++) {
1034 sintemp1 = sinCache1b[j];
1035 costemp1 = cosCache1b[j];
1036 switch(qobj->normals) {
1037 case GLU_FLAT:
1038 case GLU_SMOOTH:
1039 sintemp2 = sinCache2b[j];
1040 costemp2 = cosCache2b[j];
1041 break;
1042 default:
1043 break;
1044 }
1045 for (i = 0; i < slices; i++) {
1046 switch(qobj->normals) {
1047 case GLU_FLAT:
1048 case GLU_SMOOTH:
1049 glNormal3f(sinCache2a[i] * sintemp2,
1050 cosCache2a[i] * sintemp2,
1051 costemp2);
1052 break;
1053 case GLU_NONE:
1054 default:
1055 break;
1056 }
1057
1058 zLow = j * radius / stacks;
1059
1060 if (qobj->textureCoords) {
1061 glTexCoord2f(1 - (float) i / slices,
1062 1 - (float) j / stacks);
1063 }
1064 glVertex3f(sintemp1 * sinCache1a[i],
1065 sintemp1 * cosCache1a[i], costemp1);
1066 }
1067 }
1068 glEnd();
1069 break;
1070 case GLU_LINE:
1071 case GLU_SILHOUETTE:
1072 for (j = 1; j < stacks; j++) {
1073 sintemp1 = sinCache1b[j];
1074 costemp1 = cosCache1b[j];
1075 switch(qobj->normals) {
1076 case GLU_FLAT:
1077 case GLU_SMOOTH:
1078 sintemp2 = sinCache2b[j];
1079 costemp2 = cosCache2b[j];
1080 break;
1081 default:
1082 break;
1083 }
1084
1086 for (i = 0; i <= slices; i++) {
1087 switch(qobj->normals) {
1088 case GLU_FLAT:
1089 glNormal3f(sinCache3a[i] * sintemp2,
1090 cosCache3a[i] * sintemp2,
1091 costemp2);
1092 break;
1093 case GLU_SMOOTH:
1094 glNormal3f(sinCache2a[i] * sintemp2,
1095 cosCache2a[i] * sintemp2,
1096 costemp2);
1097 break;
1098 case GLU_NONE:
1099 default:
1100 break;
1101 }
1102 if (qobj->textureCoords) {
1103 glTexCoord2f(1 - (float) i / slices,
1104 1 - (float) j / stacks);
1105 }
1106 glVertex3f(sintemp1 * sinCache1a[i],
1107 sintemp1 * cosCache1a[i], costemp1);
1108 }
1109 glEnd();
1110 }
1111 for (i = 0; i < slices; i++) {
1112 sintemp1 = sinCache1a[i];
1113 costemp1 = cosCache1a[i];
1114 switch(qobj->normals) {
1115 case GLU_FLAT:
1116 case GLU_SMOOTH:
1117 sintemp2 = sinCache2a[i];
1118 costemp2 = cosCache2a[i];
1119 break;
1120 default:
1121 break;
1122 }
1123
1125 for (j = 0; j <= stacks; j++) {
1126 switch(qobj->normals) {
1127 case GLU_FLAT:
1128 glNormal3f(sintemp2 * sinCache3b[j],
1129 costemp2 * sinCache3b[j],
1130 cosCache3b[j]);
1131 break;
1132 case GLU_SMOOTH:
1133 glNormal3f(sintemp2 * sinCache2b[j],
1134 costemp2 * sinCache2b[j],
1135 cosCache2b[j]);
1136 break;
1137 case GLU_NONE:
1138 default:
1139 break;
1140 }
1141
1142 if (qobj->textureCoords) {
1143 glTexCoord2f(1 - (float) i / slices,
1144 1 - (float) j / stacks);
1145 }
1146 glVertex3f(sintemp1 * sinCache1b[j],
1147 costemp1 * sinCache1b[j], cosCache1b[j]);
1148 }
1149 glEnd();
1150 }
1151 break;
1152 default:
1153 break;
1154 }
1155}
GLuint start
Definition: gl.h:1545

◆ gluTessBeginContour()

GLAPI void GLAPIENTRY gluTessBeginContour ( GLUtesselator tess)

Definition at line 476 of file tess.c.

477{
478 RequireState( tess, T_IN_POLYGON );
479
480 tess->state = T_IN_CONTOUR;
481 tess->lastEdge = NULL;
482 if( tess->cacheCount > 0 ) {
483 /* Just set a flag so we don't get confused by empty contours
484 * -- these can be generated accidentally with the obsolete
485 * NextContour() interface.
486 */
487 tess->emptyCache = TRUE;
488 }
489}
int cacheCount
Definition: tess.h:107
GLUhalfEdge * lastEdge
Definition: tess.h:65
GLboolean emptyCache
Definition: tess.h:106
@ T_IN_CONTOUR
Definition: tess.h:47
@ T_IN_POLYGON
Definition: tess.h:47

◆ gluTessBeginPolygon()

GLAPI void GLAPIENTRY gluTessBeginPolygon ( GLUtesselator tess,
GLvoid data 
)

Definition at line 462 of file tess.c.

463{
464 RequireState( tess, T_DORMANT );
465
466 tess->state = T_IN_POLYGON;
467 tess->cacheCount = 0;
468 tess->emptyCache = FALSE;
469 tess->mesh = NULL;
470
471 tess->polygonData= data;
472}
GLUmesh * mesh
Definition: tess.h:66

◆ gluTessCallback()

GLAPI void GLAPIENTRY gluTessCallback ( GLUtesselator tess,
GLenum  which,
_GLUfuncptr  CallBackFunc 
)

Definition at line 276 of file tess.c.

277{
278 switch( which ) {
279 case GLU_TESS_BEGIN:
280 tess->callBegin = (fn == NULL) ? &noBegin : (void (GLAPIENTRY *)(GLenum)) fn;
281 return;
283 tess->callBeginData = (fn == NULL) ?
284 &__gl_noBeginData : (void (GLAPIENTRY *)(GLenum, void *)) fn;
285 return;
287 tess->callEdgeFlag = (fn == NULL) ? &noEdgeFlag :
288 (void (GLAPIENTRY *)(GLboolean)) fn;
289 /* If the client wants boundary edges to be flagged,
290 * we render everything as separate triangles (no strips or fans).
291 */
292 tess->flagBoundary = (fn != NULL);
293 return;
295 tess->callEdgeFlagData= (fn == NULL) ?
296 &__gl_noEdgeFlagData : (void (GLAPIENTRY *)(GLboolean, void *)) fn;
297 /* If the client wants boundary edges to be flagged,
298 * we render everything as separate triangles (no strips or fans).
299 */
300 tess->flagBoundary = (fn != NULL);
301 return;
302 case GLU_TESS_VERTEX:
303 tess->callVertex = (fn == NULL) ? &noVertex :
304 (void (GLAPIENTRY *)(void *)) fn;
305 return;
307 tess->callVertexData = (fn == NULL) ?
308 &__gl_noVertexData : (void (GLAPIENTRY *)(void *, void *)) fn;
309 return;
310 case GLU_TESS_END:
311 tess->callEnd = (fn == NULL) ? &noEnd : (void (GLAPIENTRY *)(void)) fn;
312 return;
314 tess->callEndData = (fn == NULL) ? &__gl_noEndData :
315 (void (GLAPIENTRY *)(void *)) fn;
316 return;
317 case GLU_TESS_ERROR:
318 tess->callError = (fn == NULL) ? &noError : (void (GLAPIENTRY *)(GLenum)) fn;
319 return;
321 tess->callErrorData = (fn == NULL) ?
322 &__gl_noErrorData : (void (GLAPIENTRY *)(GLenum, void *)) fn;
323 return;
324 case GLU_TESS_COMBINE:
325 tess->callCombine = (fn == NULL) ? &noCombine :
326 (void (GLAPIENTRY *)(GLdouble [3],void *[4], GLfloat [4], void ** )) fn;
327 return;
329 tess->callCombineData = (fn == NULL) ? &__gl_noCombineData :
330 (void (GLAPIENTRY *)(GLdouble [3],
331 void *[4],
332 GLfloat [4],
333 void **,
334 void *)) fn;
335 return;
336 case GLU_TESS_MESH:
337 tess->callMesh = (fn == NULL) ? &noMesh : (void (GLAPIENTRY *)(GLUmesh *)) fn;
338 return;
339 default:
341 return;
342 }
343}
#define GLU_TESS_VERTEX
Definition: glu.h:216
#define GLU_TESS_BEGIN_DATA
Definition: glu.h:224
#define GLU_TESS_COMBINE_DATA
Definition: glu.h:229
#define GLU_TESS_END_DATA
Definition: glu.h:226
#define GLU_TESS_END
Definition: glu.h:218
#define GLU_TESS_EDGE_FLAG
Definition: glu.h:221
#define GLU_TESS_EDGE_FLAG_DATA
Definition: glu.h:228
#define GLU_TESS_VERTEX_DATA
Definition: glu.h:225
#define GLU_TESS_BEGIN
Definition: glu.h:214
#define GLU_TESS_COMBINE
Definition: glu.h:223
#define GLU_TESS_ERROR
Definition: glu.h:220
#define GLU_TESS_ERROR_DATA
Definition: glu.h:227
Definition: mesh.h:163
#define GLU_TESS_MESH
Definition: tess.c:48

◆ gluTessEndContour()

GLAPI void GLAPIENTRY gluTessEndContour ( GLUtesselator tess)

Definition at line 493 of file tess.c.

494{
495 RequireState( tess, T_IN_CONTOUR );
496 tess->state = T_IN_POLYGON;
497}

◆ gluTessEndPolygon()

GLAPI void GLAPIENTRY gluTessEndPolygon ( GLUtesselator tess)

Definition at line 500 of file tess.c.

501{
502 GLUmesh *mesh;
503
504 if (setjmp(tess->env) != 0) {
505 /* come back here if out of memory */
507 return;
508 }
509
510 RequireState( tess, T_IN_POLYGON );
511 tess->state = T_DORMANT;
512
513 if( tess->mesh == NULL ) {
514 if( ! tess->flagBoundary && tess->callMesh == &noMesh ) {
515
516 /* Try some special code to make the easy cases go quickly
517 * (eg. convex polygons). This code does NOT handle multiple contours,
518 * intersections, edge flags, and of course it does not generate
519 * an explicit mesh either.
520 */
521 if( __gl_renderCache( tess )) {
522 tess->polygonData= NULL;
523 return;
524 }
525 }
526 if ( !EmptyCache( tess ) ) longjmp(tess->env,1); /* could've used a label*/
527 }
528
529 /* Determine the polygon normal and project vertices onto the plane
530 * of the polygon.
531 */
532 __gl_projectPolygon( tess );
533
534 /* __gl_computeInterior( tess ) computes the planar arrangement specified
535 * by the given contours, and further subdivides this arrangement
536 * into regions. Each region is marked "inside" if it belongs
537 * to the polygon, according to the rule given by tess->windingRule.
538 * Each interior region is guaranteed be monotone.
539 */
540 if ( !__gl_computeInterior( tess ) ) {
541 longjmp(tess->env,1); /* could've used a label */
542 }
543
544 mesh = tess->mesh;
545 if( ! tess->fatalError ) {
546 int rc = 1;
547
548 /* If the user wants only the boundary contours, we throw away all edges
549 * except those which separate the interior from the exterior.
550 * Otherwise we tessellate all the regions marked "inside".
551 */
552 if( tess->boundaryOnly ) {
554 } else {
556 }
557 if (rc == 0) longjmp(tess->env,1); /* could've used a label */
558
560
561 if( tess->callBegin != &noBegin || tess->callEnd != &noEnd
562 || tess->callVertex != &noVertex || tess->callEdgeFlag != &noEdgeFlag
563 || tess->callBeginData != &__gl_noBeginData
564 || tess->callEndData != &__gl_noEndData
565 || tess->callVertexData != &__gl_noVertexData
566 || tess->callEdgeFlagData != &__gl_noEdgeFlagData )
567 {
568 if( tess->boundaryOnly ) {
569 __gl_renderBoundary( tess, mesh ); /* output boundary contours */
570 } else {
571 __gl_renderMesh( tess, mesh ); /* output strips and fans */
572 }
573 }
574 if( tess->callMesh != &noMesh ) {
575
576 /* Throw away the exterior faces, so that all faces are interior.
577 * This way the user doesn't have to check the "inside" flag,
578 * and we don't need to even reveal its existence. It also leaves
579 * the freedom for an implementation to not generate the exterior
580 * faces in the first place.
581 */
583 (*tess->callMesh)( mesh ); /* user wants the mesh itself */
584 tess->mesh = NULL;
585 tess->polygonData= NULL;
586 return;
587 }
588 }
590 tess->polygonData= NULL;
591 tess->mesh = NULL;
592}
#define setjmp
Definition: setjmp.h:209
void __gl_meshCheckMesh(GLUmesh *mesh)
Definition: mesh.c:742
void __gl_meshDeleteMesh(GLUmesh *mesh)
Definition: mesh.c:711
GLboolean __gl_renderCache(GLUtesselator *tess)
Definition: render.c:441
void __gl_renderMesh(GLUtesselator *tess, GLUmesh *mesh)
Definition: render.c:82
void __gl_renderBoundary(GLUtesselator *tess, GLUmesh *mesh)
Definition: render.c:339
void __gl_projectPolygon(GLUtesselator *tess)
Definition: normal.c:198
GLboolean fatalError
Definition: tess.h:81
jmp_buf env
Definition: tess.h:121
Definition: mesh.c:198
int __gl_computeInterior(GLUtesselator *tess)
Definition: sweep.c:1301
static int EmptyCache(GLUtesselator *tess)
Definition: tess.c:396
int __gl_meshSetWindingNumber(GLUmesh *mesh, int value, GLboolean keepOnlyBoundary)
Definition: tessmono.c:179
void __gl_meshDiscardExterior(GLUmesh *mesh)
Definition: tessmono.c:155
int __gl_meshTessellateInterior(GLUmesh *mesh)
Definition: tessmono.c:133

◆ gluTessNormal()

GLAPI void GLAPIENTRY gluTessNormal ( GLUtesselator tess,
GLdouble  valueX,
GLdouble  valueY,
GLdouble  valueZ 
)

Definition at line 268 of file tess.c.

269{
270 tess->normal[0] = x;
271 tess->normal[1] = y;
272 tess->normal[2] = z;
273}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble z
Definition: glext.h:5874

◆ gluTessProperty()

GLAPI void GLAPIENTRY gluTessProperty ( GLUtesselator tess,
GLenum  which,
GLdouble  data 
)

Definition at line 201 of file tess.c.

202{
203 GLenum windingRule;
204
205 switch( which ) {
207 if( value < 0.0 || value > 1.0 ) break;
208 tess->relTolerance = value;
209 return;
210
212 windingRule = (GLenum) value;
213 if( windingRule != value ) break; /* not an integer */
214
215 switch( windingRule ) {
221 tess->windingRule = windingRule;
222 return;
223 default:
224 break;
225 }
226
228 tess->boundaryOnly = (value != 0);
229 return;
230
231 default:
233 return;
234 }
236}

◆ gluTessVertex()

GLAPI void GLAPIENTRY gluTessVertex ( GLUtesselator tess,
GLdouble location,
GLvoid data 
)

◆ gluUnProject()

GLAPI GLint GLAPIENTRY gluUnProject ( GLdouble  winX,
GLdouble  winY,
GLdouble  winZ,
const GLdouble model,
const GLdouble proj,
const GLint view,
GLdouble objX,
GLdouble objY,
GLdouble objZ 
)

◆ gluUnProject4()

GLAPI GLint GLAPIENTRY 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 
)

◆ void()

typedef void ( GLAPIENTRYP  _GLUfuncptr)