Logo ROOT   6.10/09
Reference Guide
GLConstants.h
Go to the documentation of this file.
1 /* @(#)root/base:$Id$ */
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_GLConstants
12 #define ROOT_GLConstants
13 
14 //*-* This contains the map for those OpenGL package constant the ROOT uses
15 //*-* We need the second table since CINT doesn't understand the "define" pre-processor command
16 
17 
18 #ifndef __CINT__
19 #ifndef GLConstants
20 
21 #define GLConstants1(abc_prefix) \
22  abc_prefix##QUAD_STRIP, abc_prefix##QUADS, abc_prefix##COMPILE, abc_prefix##COMPILE_AND_EXECUTE \
23  ,abc_prefix##LIGHT0 , abc_prefix##LIGHT1 , abc_prefix##LIGHT2 , abc_prefix##LIGHT3 \
24  ,abc_prefix##LIGHT4 , abc_prefix##LIGHT5 , abc_prefix##LIGHT6 , abc_prefix##LIGHT7 \
25  ,abc_prefix##CW , abc_prefix##CCW \
26  ,abc_prefix##FRONT , abc_prefix##BACK , abc_prefix##FRONT_AND_BACK \
27  ,abc_prefix##POINT , abc_prefix##LINE , abc_prefix##FILL \
28  ,abc_prefix##ACCUM_ALPHA_BITS, abc_prefix##ACCUM_BLUE_BITS, abc_prefix##ACCUM_CLEAR_VALUE \
29  ,abc_prefix##ACCUM_GREEN_BITS, abc_prefix##ACCUM_RED_BITS, abc_prefix##ALPHA_BIAS \
30  ,abc_prefix##ALPHA_BITS, abc_prefix##ALPHA_SCALE, abc_prefix##ALPHA_TEST \
31  ,abc_prefix##ALPHA_TEST_FUNC, abc_prefix##ALPHA_TEST_REF, abc_prefix##ATTRIB_STACK_DEPTH \
32  ,abc_prefix##AUTO_NORMAL, abc_prefix##AUX_BUFFERS, abc_prefix##BLEND \
33  ,abc_prefix##BLEND_DST, abc_prefix##BLEND_SRC, abc_prefix##BLUE_BIAS \
34  ,abc_prefix##BLUE_BITS, abc_prefix##BLUE_SCALE, abc_prefix##COLOR_CLEAR_VALUE \
35  ,abc_prefix##COLOR_MATERIAL, abc_prefix##COLOR_MATERIAL_FACE \
36  ,abc_prefix##COLOR_MATERIAL_PARAMETER, abc_prefix##COLOR_WRITEMASK \
37  ,abc_prefix##CULL_FACE, abc_prefix##CULL_FACE_MODE, abc_prefix##CURRENT_COLOR
38 
39 #define GLConstants2(abc_prefix) \
40  ,abc_prefix##CURRENT_INDEX, abc_prefix##CURRENT_NORMAL, abc_prefix##CURRENT_RASTER_COLOR \
41  ,abc_prefix##CURRENT_RASTER_DISTANCE, abc_prefix##CURRENT_RASTER_INDEX \
42  ,abc_prefix##CURRENT_RASTER_POSITION, abc_prefix##CURRENT_RASTER_TEXTURE_COORDS \
43  ,abc_prefix##CURRENT_RASTER_POSITION_VALID, abc_prefix##CURRENT_TEXTURE_COORDS \
44  ,abc_prefix##DEPTH_BIAS, abc_prefix##DEPTH_BITS, abc_prefix##DEPTH_CLEAR_VALUE \
45  ,abc_prefix##DEPTH_FUNC, abc_prefix##DEPTH_RANGE, abc_prefix##DEPTH_SCALE \
46  ,abc_prefix##DEPTH_TEST, abc_prefix##DEPTH_WRITEMASK, abc_prefix##DITHER \
47  ,abc_prefix##DOUBLEBUFFER, abc_prefix##DRAW_BUFFER, abc_prefix##EDGE_FLAG \
48  ,abc_prefix##FOG, abc_prefix##FOG_COLOR, abc_prefix##FOG_DENSITY \
49  ,abc_prefix##FOG_END, abc_prefix##FOG_HINT, abc_prefix##FOG_INDEX \
50  ,abc_prefix##FOG_MODE, abc_prefix##FOG_START, abc_prefix##FRONT_FACE \
51  ,abc_prefix##GREEN_BIAS, abc_prefix##GREEN_BITS, abc_prefix##GREEN_SCALE \
52  ,abc_prefix##INDEX_BITS, abc_prefix##INDEX_CLEAR_VALUE \
53  ,abc_prefix##INDEX_MODE, abc_prefix##INDEX_OFFSET, abc_prefix##INDEX_SHIFT \
54  ,abc_prefix##INDEX_WRITEMASK, abc_prefix##LIGHTING, abc_prefix##LIGHT_MODEL_AMBIENT \
55  ,abc_prefix##LIGHT_MODEL_LOCAL_VIEWER, abc_prefix##LIGHT_MODEL_TWO_SIDE
56 
57 #define GLConstants3(abc_prefix) \
58  ,abc_prefix##LINE_SMOOTH, abc_prefix##LINE_SMOOTH_HINT,abc_prefix##LINE_STIPPLE \
59  ,abc_prefix##LINE_STIPPLE_PATTERN, abc_prefix##LINE_STIPPLE_REPEAT \
60  ,abc_prefix##LINE_WIDTH, abc_prefix##LINE_WIDTH_GRANULARITY \
61  ,abc_prefix##LINE_WIDTH_RANGE, abc_prefix##LIST_BASE, abc_prefix##LIST_INDEX \
62  ,abc_prefix##LIST_MODE, abc_prefix##LOGIC_OP, abc_prefix##LOGIC_OP_MODE \
63  ,abc_prefix##MAP1_COLOR_4, abc_prefix##MAP1_GRID_DOMAIN,abc_prefix##MAP1_GRID_SEGMENTS \
64  ,abc_prefix##MAP1_INDEX, abc_prefix##MAP1_NORMAL, abc_prefix##MAP1_TEXTURE_COORD_1 \
65  ,abc_prefix##MAP1_TEXTURE_COORD_2, abc_prefix##MAP1_TEXTURE_COORD_3 \
66  ,abc_prefix##MAP1_TEXTURE_COORD_4, abc_prefix##MAP1_VERTEX_3 \
67  ,abc_prefix##MAP1_VERTEX_4, abc_prefix##MAP2_COLOR_4, abc_prefix##MAP2_GRID_DOMAIN \
68  ,abc_prefix##MAP2_GRID_SEGMENTS, abc_prefix##MAP2_INDEX \
69  ,abc_prefix##MAP2_NORMAL, abc_prefix##MAP2_TEXTURE_COORD_1 \
70  ,abc_prefix##MAP2_TEXTURE_COORD_2, abc_prefix##MAP2_TEXTURE_COORD_3 \
71  ,abc_prefix##MAP2_TEXTURE_COORD_4, abc_prefix##MAP2_VERTEX_3 \
72  ,abc_prefix##MAP2_VERTEX_4, abc_prefix##MAP_COLOR, abc_prefix##MAP_STENCIL \
73  ,abc_prefix##MATRIX_MODE, abc_prefix##MAX_ATTRIB_STACK_DEPTH \
74  ,abc_prefix##MAX_CLIP_PLANES, abc_prefix##MAX_EVAL_ORDER, abc_prefix##MAX_LIGHTS \
75  ,abc_prefix##MAX_LIST_NESTING, abc_prefix##MAX_MODELVIEW_STACK_DEPTH \
76  ,abc_prefix##MAX_NAME_STACK_DEPTH, abc_prefix##MAX_PIXEL_MAP_TABLE \
77  ,abc_prefix##MAX_PROJECTION_STACK_DEPTH, abc_prefix##MAX_TEXTURE_SIZE \
78  ,abc_prefix##MAX_TEXTURE_STACK_DEPTH, abc_prefix##MAX_VIEWPORT_DIMS
79 
80 #define GLConstants4(abc_prefix) \
81  ,abc_prefix##MODELVIEW_MATRIX, abc_prefix##MODELVIEW_STACK_DEPTH \
82  ,abc_prefix##NAME_STACK_DEPTH, abc_prefix##NORMALIZE, abc_prefix##PACK_ALIGNMENT \
83  ,abc_prefix##PACK_LSB_FIRST, abc_prefix##PACK_ROW_LENGTH, abc_prefix##PACK_SKIP_PIXELS \
84  ,abc_prefix##PACK_SKIP_ROWS, abc_prefix##PACK_SWAP_BYTES, abc_prefix##PERSPECTIVE_CORRECTION_HINT \
85  ,abc_prefix##PIXEL_MAP_A_TO_A_SIZE, abc_prefix##PIXEL_MAP_B_TO_B_SIZE \
86  ,abc_prefix##PIXEL_MAP_G_TO_G_SIZE, abc_prefix##PIXEL_MAP_I_TO_A_SIZE \
87  ,abc_prefix##PIXEL_MAP_I_TO_B_SIZE, abc_prefix##PIXEL_MAP_I_TO_G_SIZE \
88  ,abc_prefix##PIXEL_MAP_I_TO_I_SIZE, abc_prefix##PIXEL_MAP_I_TO_R_SIZE \
89  ,abc_prefix##PIXEL_MAP_R_TO_R_SIZE, abc_prefix##PIXEL_MAP_S_TO_S_SIZE \
90  ,abc_prefix##POINT_SIZE, abc_prefix##POINT_SIZE_GRANULARITY \
91  ,abc_prefix##POINT_SIZE_RANGE, abc_prefix##POINT_SMOOTH, abc_prefix##POINT_SMOOTH_HINT \
92  ,abc_prefix##POLYGON_MODE, abc_prefix##POLYGON_SMOOTH, abc_prefix##POLYGON_SMOOTH_HINT \
93  ,abc_prefix##POLYGON_STIPPLE, abc_prefix##PROJECTION_MATRIX, abc_prefix##PROJECTION_STACK_DEPTH \
94  ,abc_prefix##READ_BUFFER, abc_prefix##RED_BIAS, abc_prefix##RED_BITS \
95  ,abc_prefix##RED_SCALE, abc_prefix##RENDER_MODE, abc_prefix##RGBA_MODE \
96  ,abc_prefix##SCISSOR_BOX, abc_prefix##SCISSOR_TEST, abc_prefix##SHADE_MODEL \
97  ,abc_prefix##STENCIL_BITS, abc_prefix##STENCIL_CLEAR_VALUE \
98  ,abc_prefix##STENCIL_FAIL, abc_prefix##STENCIL_FUNC, abc_prefix##STENCIL_PASS_DEPTH_FAIL \
99  ,abc_prefix##STENCIL_PASS_DEPTH_PASS, abc_prefix##STENCIL_REF \
100  ,abc_prefix##STENCIL_TEST, abc_prefix##STENCIL_VALUE_MASK,abc_prefix##STENCIL_WRITEMASK \
101  ,abc_prefix##STEREO, abc_prefix##SUBPIXEL_BITS, abc_prefix##TEXTURE_1D \
102  ,abc_prefix##TEXTURE_2D, abc_prefix##TEXTURE_ENV_COLOR,abc_prefix##TEXTURE_ENV_MODE \
103  ,abc_prefix##TEXTURE_GEN_S, abc_prefix##TEXTURE_GEN_T, abc_prefix##TEXTURE_GEN_R \
104  ,abc_prefix##TEXTURE_GEN_Q, abc_prefix##TEXTURE_MATRIX, abc_prefix##TEXTURE_STACK_DEPTH \
105  ,abc_prefix##UNPACK_ALIGNMENT, abc_prefix##UNPACK_LSB_FIRST,abc_prefix##UNPACK_ROW_LENGTH \
106  ,abc_prefix##UNPACK_SKIP_PIXELS,abc_prefix##UNPACK_SKIP_ROWS,abc_prefix##UNPACK_SWAP_BYTES \
107  ,abc_prefix##VIEWPORT, abc_prefix##ZOOM_X, abc_prefix##ZOOM_Y \
108  ,abc_prefix##SMOOTH, abc_prefix##FLAT
109 
110 #define GLConstants5(abc_prefix) \
111  ,abc_prefix##POINTS, abc_prefix##LINES, abc_prefix##LINE_STRIP, abc_prefix##LINE_LOOP \
112  ,abc_prefix##TRIANGLES, abc_prefix##TRIANGLE_STRIP, abc_prefix##TRIANGLE_FAN \
113  ,abc_prefix##POLYGON
114 
115 #define GLConstants6(abc_prefix) \
116  ,abc_prefix##DIFFUSE, abc_prefix##POSITION, abc_prefix##CLIP_PLANE0
117 
118 #define GLConstants(abc_prefix) \
119  GLConstants1(abc_prefix) \
120  GLConstants2(abc_prefix) \
121  GLConstants3(abc_prefix) \
122  GLConstants4(abc_prefix) \
123  GLConstants5(abc_prefix) \
124  GLConstants6(abc_prefix)
125 #endif
126 
127 
129 
130 #else
131 enum EG3D2GLmode {
132  kQUAD_STRIP, kQUADS, kCOMPILE, kCOMPILE_AND_EXECUTE
133  ,kLIGHT0 , kLIGHT1 , kLIGHT2 , kLIGHT3
134  ,kLIGHT4 , kLIGHT5 , kLIGHT6 , kLIGHT7
135  ,kCW , kCCW
136  ,kFRONT , kBACK , kFRONT_AND_BACK
137  ,kPOINT , kLINE , kFILL ,
138  ,kACCUM_ALPHA_BITS, kACCUM_BLUE_BITS, kACCUM_CLEAR_VALUE
139  ,kACCUM_GREEN_BITS, kACCUM_RED_BITS, kALPHA_BIAS
140  ,kALPHA_BITS, kALPHA_SCALE, kALPHA_TEST
141  ,kALPHA_TEST_FUNC, kALPHA_TEST_REF, kATTRIB_STACK_DEPTH
142  ,kAUTO_NORMAL, kAUX_BUFFERS, kBLEND
143  ,kBLEND_DST, kBLEND_SRC, kBLUE_BIAS
144  ,kBLUE_BITS, kBLUE_SCALE, kCOLOR_CLEAR_VALUE
145  ,kCOLOR_MATERIAL, kCOLOR_MATERIAL_FACE
146  ,kCOLOR_MATERIAL_PARAMETER, kCOLOR_WRITEMASK
147  ,kCULL_FACE, kCULL_FACE_MODE, kCURRENT_COLOR
148  ,kCURRENT_INDEX, kCURRENT_NORMAL, kCURRENT_RASTER_COLOR
149  ,kCURRENT_RASTER_DISTANCE, kCURRENT_RASTER_INDEX
150  ,kCURRENT_RASTER_POSITION, kCURRENT_RASTER_TEXTURE_COORDS
151  ,kCURRENT_RASTER_POSITION_VALID, kCURRENT_TEXTURE_COORDS
152  ,kDEPTH_BIAS, kDEPTH_BITS, kDEPTH_CLEAR_VALUE
153  ,kDEPTH_FUNC, kDEPTH_RANGE, kDEPTH_SCALE
154  ,kDEPTH_TEST, kDEPTH_WRITEMASK, kDITHER
155  ,kDOUBLEBUFFER, kDRAW_BUFFER, kEDGE_FLAG
156  ,kFOG, kFOG_COLOR, kFOG_DENSITY
157  ,kFOG_END, kFOG_HINT, kFOG_INDEX
158  ,kFOG_MODE, kFOG_START, kFRONT_FACE
159  ,kGREEN_BIAS, kGREEN_BITS, kGREEN_SCALE
160  ,kINDEX_BITS, kINDEX_CLEAR_VALUE
161  ,kINDEX_MODE, kINDEX_OFFSET, kINDEX_SHIFT
162  ,kINDEX_WRITEMASK, kLIGHTING, kLIGHT_MODEL_AMBIENT
163  ,kLIGHT_MODEL_LOCAL_VIEWER, kLIGHT_MODEL_TWO_SIDE
164  ,kLINE_SMOOTH, kLINE_SMOOTH_HINT,kLINE_STIPPLE
165  ,kLINE_STIPPLE_PATTERN, kLINE_STIPPLE_REPEAT
166  ,kLINE_WIDTH, kLINE_WIDTH_GRANULARITY
167  ,kLINE_WIDTH_RANGE, kLIST_BASE, kLIST_INDEX
168  ,kLIST_MODE, kLOGIC_OP, kLOGIC_OP_MODE
169  ,kMAP1_COLOR_4, kMAP1_GRID_DOMAIN,kMAP1_GRID_SEGMENTS
170  ,kMAP1_INDEX, kMAP1_NORMAL, kMAP1_TEXTURE_COORD_1
171  ,kMAP1_TEXTURE_COORD_2, kMAP1_TEXTURE_COORD_3
172  ,kMAP1_TEXTURE_COORD_4, kMAP1_VERTEX_3
173  ,kMAP1_VERTEX_4, kMAP2_COLOR_4, kMAP2_GRID_DOMAIN
174  ,kMAP2_GRID_SEGMENTS, kMAP2_INDEX
175  ,kMAP2_NORMAL, kMAP2_TEXTURE_COORD_1
176  ,kMAP2_TEXTURE_COORD_2, kMAP2_TEXTURE_COORD_3
177  ,kMAP2_TEXTURE_COORD_4, kMAP2_VERTEX_3
178  ,kMAP2_VERTEX_4, kMAP_COLOR, kMAP_STENCIL
179  ,kMATRIX_MODE, kMAX_ATTRIB_STACK_DEPTH
180  ,kMAX_CLIP_PLANES, kMAX_EVAL_ORDER, kMAX_LIGHTS
181  ,kMAX_LIST_NESTING, kMAX_MODELVIEW_STACK_DEPTH
182  ,kMAX_NAME_STACK_DEPTH, kMAX_PIXEL_MAP_TABLE
183  ,kMAX_PROJECTION_STACK_DEPTH, kMAX_TEXTURE_SIZE
184  ,kMAX_TEXTURE_STACK_DEPTH, kMAX_VIEWPORT_DIMS
185  ,kMODELVIEW_MATRIX, kMODELVIEW_STACK_DEPTH
186  ,kNAME_STACK_DEPTH, kNORMALIZE, kPACK_ALIGNMENT
187  ,kPACK_LSB_FIRST, kPACK_ROW_LENGTH, kPACK_SKIP_PIXELS
188  ,kPACK_SKIP_ROWS, kPACK_SWAP_BYTES, kPERSPECTIVE_CORRECTION_HINT
189  ,kPIXEL_MAP_A_TO_A_SIZE, kPIXEL_MAP_B_TO_B_SIZE
190  ,kPIXEL_MAP_G_TO_G_SIZE, kPIXEL_MAP_I_TO_A_SIZE
191  ,kPIXEL_MAP_I_TO_B_SIZE, kPIXEL_MAP_I_TO_G_SIZE
192  ,kPIXEL_MAP_I_TO_I_SIZE, kPIXEL_MAP_I_TO_R_SIZE
193  ,kPIXEL_MAP_R_TO_R_SIZE, kPIXEL_MAP_S_TO_S_SIZE
194  ,kPOINT_SIZE, kPOINT_SIZE_GRANULARITY
195  ,kPOINT_SIZE_RANGE, kPOINT_SMOOTH, kPOINT_SMOOTH_HINT
196  ,kPOLYGON_MODE, kPOLYGON_SMOOTH, kPOLYGON_SMOOTH_HINT
197  ,kPOLYGON_STIPPLE, kPROJECTION_MATRIX, kPROJECTION_STACK_DEPTH
198  ,kREAD_BUFFER, kRED_BIAS, kRED_BITS
199  ,kRED_SCALE, kRENDER_MODE, kRGBA_MODE
200  ,kSCISSOR_BOX, kSCISSOR_TEST, kSHADE_MODEL
201  ,kSTENCIL_BITS, kSTENCIL_CLEAR_VALUE
202  ,kSTENCIL_FAIL, kSTENCIL_FUNC, kSTENCIL_PASS_DEPTH_FAIL
203  ,kSTENCIL_PASS_DEPTH_PASS, kSTENCIL_REF
204  ,kSTENCIL_TEST, kSTENCIL_VALUE_MASK,kSTENCIL_WRITEMASK
205  ,kSTEREO, kSUBPIXEL_BITS, kTEXTURE_1D
206  ,kTEXTURE_2D, kTEXTURE_ENV_COLOR,kTEXTURE_ENV_MODE
207  ,kTEXTURE_GEN_S, kTEXTURE_GEN_T, kTEXTURE_GEN_R
208  ,kTEXTURE_GEN_Q, kTEXTURE_MATRIX, kTEXTURE_STACK_DEPTH
209  ,kUNPACK_ALIGNMENT, kUNPACK_LSB_FIRST,kUNPACK_ROW_LENGTH
210  ,kUNPACK_SKIP_PIXELS,kUNPACK_SKIP_ROWS,kUNPACK_SWAP_BYTES
211  ,kVIEWPORT, kZOOM_X, kZOOM_Y
212  ,kSMOOTH, kFLAT
213  };
214 #endif
215 
216 #endif
EG3D2GLmode
Definition: GLConstants.h:128
#define GLConstants(abc_prefix)
Definition: GLConstants.h:118