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