Geant4 Cross Reference |
1 /* 2 G.Barrand : glu.h of Mesa-7.8.1 but containing only tess related material. 3 We bring also the needed material from gl.h. 4 */ 5 6 #ifndef tools_glutess__glu 7 #define tools_glutess__glu 8 9 #include "rename" 10 11 /* //////////////////////////////////////////////////////////////// */ 12 /* //////////////////////////////////////////////////////////////// */ 13 14 typedef unsigned int GLUenum; 15 typedef void GLUvoid; 16 typedef double GLUdouble; 17 18 typedef unsigned char GLUboolean; 19 typedef float GLUfloat; /* single precision float */ 20 typedef double GLUclampd; /* double precision float in [0,1] */ 21 22 /* //////////////////////////////////////////////////////////////// */ 23 /* //////////////////////////////////////////////////////////////// */ 24 /* //////////////////////////////////////////////////////////////// */ 25 26 /* TessCallback */ 27 #define GLU_TESS_BEGIN_DATA 100106 28 #define GLU_TESS_VERTEX_DATA 100107 29 #define GLU_TESS_END_DATA 100108 30 #define GLU_TESS_ERROR_DATA 100109 31 #define GLU_TESS_COMBINE_DATA 100111 32 33 /* TessProperty */ 34 #define GLU_TESS_WINDING_RULE 100140 35 //#define GLU_TESS_TOLERANCE 100142 36 37 /* TessWinding */ 38 #define GLU_TESS_WINDING_ODD 100130 39 #define GLU_TESS_WINDING_POSITIVE 100132 40 #define GLU_TESS_WINDING_NEGATIVE 100133 41 42 /*************************************************************/ 43 44 // mesa glu has the below for Windows. 45 //#define GLUAPIENTRY __stdcall 46 //typedef void (__stdcall* _GLUfuncptr)(); 47 48 #define GLUAPIENTRY 49 typedef void (* _GLUfuncptr)(); 50 51 #define GLUAPI 52 53 typedef struct GLUtesselator GLUtesselator; 54 55 typedef GLUtesselator GLUtesselatorObj; 56 typedef GLUtesselator GLUtriangulatorObj; 57 58 /* 59 GLUAPI GLUtesselator* GLUAPIENTRY gluNewTess (void); 60 GLUAPI void GLUAPIENTRY gluDeleteTess (GLUtesselator* tess); 61 62 GLUAPI void GLUAPIENTRY gluTessBeginContour (GLUtesselator* tess); 63 GLUAPI void GLUAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLUvoid* data); 64 GLUAPI void GLUAPIENTRY gluTessCallback (GLUtesselator* tess, GLUenum which, _GLUfuncptr CallBackFunc); 65 GLUAPI void GLUAPIENTRY gluTessEndContour (GLUtesselator* tess); 66 GLUAPI void GLUAPIENTRY gluTessEndPolygon (GLUtesselator* tess); 67 GLUAPI void GLUAPIENTRY gluTessNormal (GLUtesselator* tess, GLUdouble valueX, GLUdouble valueY, GLUdouble valueZ); 68 GLUAPI void GLUAPIENTRY gluTessProperty (GLUtesselator* tess, GLUenum which, GLUdouble data); 69 GLUAPI void GLUAPIENTRY gluTessVertex (GLUtesselator* tess, GLUdouble *location, GLUvoid* data); 70 */ 71 72 #define GLU_MIN(x,y) ((x) <= (y) ? (x) : (y)) 73 #define GLU_MAX(x,y) ((x) >= (y) ? (x) : (y)) 74 #define GLU_ABS(x) ((x) < 0 ? -(x) : (x)) 75 76 /* //////////////////////////////////////////////////////////////// */ 77 /* //////////////////////////////////////////////////////////////// */ 78 /* //////////////////////////////////////////////////////////////// */ 79 80 /* Boolean values */ 81 #define TOOLS_GLU_FALSE 0x0 82 #define TOOLS_GLU_TRUE 0x1 83 84 /* Primitives */ 85 #define GLU_LINE_LOOP 0x0002 86 #define GLU_TRIANGLES 0x0004 87 #define GLU_TRIANGLE_STRIP 0x0005 88 #define GLU_TRIANGLE_FAN 0x0006 89 90 #define GLU_TESS_MAX_COORD 1.0e150 91 92 /* ErrorCode */ 93 #define GLU_INVALID_ENUM 100900 94 #define GLU_INVALID_VALUE 100901 95 #define GLU_OUT_OF_MEMORY 100902 96 #define GLU_INCOMPATIBLE_GL_VERSION 100903 97 #define GLU_INVALID_OPERATION 100904 98 99 /* TessCallback */ 100 #define GLU_TESS_BEGIN 100100 101 #define GLU_TESS_VERTEX 100101 102 #define GLU_TESS_END 100102 103 #define GLU_TESS_ERROR 100103 104 #define GLU_TESS_EDGE_FLAG 100104 105 #define GLU_EDGE_FLAG 100104 106 #define GLU_TESS_COMBINE 100105 107 #define GLU_TESS_EDGE_FLAG_DATA 100110 108 109 /* TessContour */ 110 #define GLU_CW 100120 111 #define GLU_CCW 100121 112 #define GLU_INTERIOR 100122 113 #define GLU_EXTERIOR 100123 114 #define GLU_UNKNOWN 100124 115 116 /* TessProperty */ 117 #define GLU_TESS_BOUNDARY_ONLY 100141 118 #define GLU_TESS_TOLERANCE 100142 119 120 /* TessError */ 121 #define GLU_TESS_ERROR1 100151 122 #define GLU_TESS_ERROR2 100152 123 #define GLU_TESS_ERROR3 100153 124 #define GLU_TESS_ERROR4 100154 125 #define GLU_TESS_ERROR5 100155 126 #define GLU_TESS_ERROR6 100156 127 #define GLU_TESS_ERROR7 100157 128 #define GLU_TESS_ERROR8 100158 129 #define GLU_TESS_MISSING_BEGIN_POLYGON 100151 130 #define GLU_TESS_MISSING_BEGIN_CONTOUR 100152 131 #define GLU_TESS_MISSING_END_POLYGON 100153 132 #define GLU_TESS_MISSING_END_CONTOUR 100154 133 #define GLU_TESS_COORD_TOO_LARGE 100155 134 #define GLU_TESS_NEED_COMBINE_CALLBACK 100156 135 136 /* TessWinding */ 137 #define GLU_TESS_WINDING_NONZERO 100131 138 #define GLU_TESS_WINDING_ABS_GEQ_TWO 100134 139 140 #endif /* __glu_h__ */