VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/get_sizes.py@ 20371

Last change on this file since 20371 was 20327, checked in by vboxsync, 15 years ago

crOpenGL: more opengl 2.0 functions

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 15.6 KB
Line 
1# Copyright (c) 2001, Stanford University
2# All rights reserved.
3#
4# See the file LICENSE.txt for information on redistributing this software.
5
6
7num_get_values = {
8 'GL_ACCUM_ALPHA_BITS' : 1,
9 'GL_ACCUM_BLUE_BITS' : 1,
10 'GL_ACCUM_CLEAR_VALUE': 4,
11 'GL_ACCUM_GREEN_BITS' : 1,
12 'GL_ACCUM_RED_BITS' : 1,
13 'GL_ALPHA_BIAS' : 1,
14 'GL_ALPHA_BITS' : 1,
15 'GL_ALPHA_SCALE' : 1,
16 'GL_ALPHA_TEST' : 1,
17 'GL_ALPHA_TEST_FUNC' : 1,
18 'GL_ALPHA_TEST_REF' : 1,
19 'GL_ATTRIB_STACK_DEPTH' : 1,
20 'GL_AUTO_NORMAL' : 1,
21 'GL_AUX_BUFFERS' : 1,
22 'GL_BLEND' : 1,
23 'GL_BLEND_DST' : 1,
24 'GL_BLEND_SRC' : 1,
25 'GL_BLUE_BIAS' : 1,
26 'GL_BLUE_BITS' : 1,
27 'GL_BLUE_SCALE' : 1,
28 'GL_CLIENT_ATTRIB_STACK_DEPTH' : 1,
29 'GL_CLIP_PLANE0' : 1,
30 'GL_CLIP_PLANE1' : 1,
31 'GL_CLIP_PLANE2' : 1,
32 'GL_CLIP_PLANE3' : 1,
33 'GL_CLIP_PLANE4' : 1,
34 'GL_CLIP_PLANE5' : 1,
35 'GL_COLOR_ARRAY' : 1,
36 'GL_COLOR_ARRAY_SIZE' : 1,
37 'GL_COLOR_ARRAY_STRIDE' : 1,
38 'GL_COLOR_ARRAY_TYPE' : 1,
39 'GL_COLOR_CLEAR_VALUE': 4,
40 'GL_COLOR_LOGIC_OP' : 1,
41 'GL_COLOR_MATERIAL' : 1,
42 'GL_COLOR_MATERIAL_FACE' : 1,
43 'GL_COLOR_MATERIAL_PARAMETER' : 1,
44 'GL_COLOR_MATRIX_STACK_DEPTH' : 1,
45 'GL_COLOR_WRITEMASK': 4,
46 'GL_CULL_FACE' : 1,
47 'GL_CULL_FACE_MODE' : 1,
48 'GL_CURRENT_COLOR': 4,
49 'GL_CURRENT_INDEX' : 1,
50 'GL_CURRENT_NORMAL': 3,
51 'GL_CURRENT_RASTER_COLOR': 4,
52 'GL_CURRENT_RASTER_DISTANCE' : 1,
53 'GL_CURRENT_RASTER_INDEX' : 1,
54 'GL_CURRENT_RASTER_POSITION': 4,
55 'GL_CURRENT_RASTER_POSITION_VALID' : 1,
56 'GL_CURRENT_RASTER_TEXTURE_COORDS': 4,
57 'GL_CURRENT_TEXTURE_COORDS': 4,
58 'GL_DEPTH_BIAS' : 1,
59 'GL_DEPTH_BITS' : 1,
60 'GL_DEPTH_CLEAR_VALUE' : 1,
61 'GL_DEPTH_FUNC' : 1,
62 'GL_DEPTH_RANGE': 2,
63 'GL_DEPTH_SCALE' : 1,
64 'GL_DEPTH_TEST' : 1,
65 'GL_DEPTH_WRITEMASK' : 1,
66 'GL_DITHER' : 1,
67 'GL_DOUBLEBUFFER' : 1,
68 'GL_DRAW_BUFFER' : 1,
69 'GL_EDGE_FLAG' : 1,
70 'GL_EDGE_FLAG_ARRAY' : 1,
71 'GL_EDGE_FLAG_ARRAY_STRIDE' : 1,
72 'GL_FEEDBACK_BUFFER_SIZE' : 1,
73 'GL_FEEDBACK_BUFFER_TYPE' : 1,
74 'GL_FOG' : 1,
75 'GL_FOG_COLOR': 4,
76 'GL_FOG_DENSITY' : 1,
77 'GL_FOG_END' : 1,
78 'GL_FOG_HINT' : 1,
79 'GL_FOG_INDEX' : 1,
80 'GL_FOG_MODE' : 1,
81 'GL_FOG_START' : 1,
82 'GL_FRONT_FACE' : 1,
83 'GL_GREEN_BIAS' : 1,
84 'GL_GREEN_BITS' : 1,
85 'GL_GREEN_SCALE' : 1,
86 'GL_INDEX_ARRAY' : 1,
87 'GL_INDEX_ARRAY_STRIDE' : 1,
88 'GL_INDEX_ARRAY_TYPE' : 1,
89 'GL_INDEX_BITS' : 1,
90 'GL_INDEX_CLEAR_VALUE' : 1,
91 'GL_INDEX_LOGIC_OP' : 1,
92 'GL_INDEX_MODE' : 1,
93 'GL_INDEX_OFFSET' : 1,
94 'GL_INDEX_SHIFT' : 1,
95 'GL_INDEX_WRITEMASK' : 1,
96 'GL_LIGHT0' : 1,
97 'GL_LIGHT1' : 1,
98 'GL_LIGHT2' : 1,
99 'GL_LIGHT3' : 1,
100 'GL_LIGHT4' : 1,
101 'GL_LIGHT5' : 1,
102 'GL_LIGHT6' : 1,
103 'GL_LIGHT7' : 1,
104 'GL_LIGHTING' : 1,
105 'GL_LIGHT_MODEL_AMBIENT': 4,
106 'GL_LIGHT_MODEL_LOCAL_VIEWER' : 1,
107 'GL_LIGHT_MODEL_TWO_SIDE' : 1,
108 'GL_LINE_SMOOTH' : 1,
109 'GL_LINE_SMOOTH_HINT' : 1,
110 'GL_LINE_STIPPLE' : 1,
111 'GL_LINE_STIPPLE_PATTERN' : 1,
112 'GL_LINE_STIPPLE_REPEAT' : 1,
113 'GL_LINE_WIDTH' : 1,
114 'GL_LINE_WIDTH_GRANULARITY' : 1,
115 'GL_LINE_WIDTH_RANGE': 2,
116 'GL_LIST_BASE' : 1,
117 'GL_LIST_INDEX' : 1,
118 'GL_LIST_MODE' : 1,
119 'GL_LOGIC_OP_MODE' : 1,
120 'GL_MAP1_COLOR_4' : 1,
121 'GL_MAP1_GRID_DOMAIN': 2,
122 'GL_MAP1_GRID_SEGMENTS' : 1,
123 'GL_MAP1_INDEX' : 1,
124 'GL_MAP1_NORMAL' : 1,
125 'GL_MAP1_TEXTURE_COORD_1' : 1,
126 'GL_MAP1_TEXTURE_COORD_2' : 1,
127 'GL_MAP1_TEXTURE_COORD_3' : 1,
128 'GL_MAP1_TEXTURE_COORD_4' : 1,
129 'GL_MAP1_VERTEX_3' : 1,
130 'GL_MAP1_VERTEX_4' : 1,
131 'GL_MAP2_COLOR_4' : 1,
132 'GL_MAP2_GRID_DOMAIN': 4,
133 'GL_MAP2_GRID_SEGMENTS': 2,
134 'GL_MAP2_INDEX' : 1,
135 'GL_MAP2_NORMAL' : 1,
136 'GL_MAP2_TEXTURE_COORD_1' : 1,
137 'GL_MAP2_TEXTURE_COORD_2' : 1,
138 'GL_MAP2_TEXTURE_COORD_3' : 1,
139 'GL_MAP2_TEXTURE_COORD_4' : 1,
140 'GL_MAP2_VERTEX_3' : 1,
141 'GL_MAP2_VERTEX_4' : 1,
142 'GL_MAP_COLOR' : 1,
143 'GL_MAP_STENCIL' : 1,
144 'GL_MATRIX_MODE' : 1,
145 'GL_MAX_CLIENT_ATTRIB_STACK_DEPTH' : 1,
146 'GL_MAX_ATTRIB_STACK_DEPTH' : 1,
147 'GL_MAX_CLIP_PLANES' : 1,
148 'GL_MAX_COLOR_MATRIX_STACK_DEPTH' : 1,
149 'GL_MAX_EVAL_ORDER' : 1,
150 'GL_MAX_LIGHTS' : 1,
151 'GL_MAX_LIST_NESTING' : 1,
152 'GL_MAX_MODELVIEW_STACK_DEPTH' : 1,
153 'GL_MAX_NAME_STACK_DEPTH' : 1,
154 'GL_MAX_PIXEL_MAP_TABLE' : 1,
155 'GL_MAX_PROJECTION_STACK_DEPTH' : 1,
156 'GL_MAX_TEXTURE_SIZE' : 1,
157 'GL_MAX_3D_TEXTURE_SIZE' : 1,
158 'GL_MAX_TEXTURE_STACK_DEPTH' : 1,
159 'GL_MAX_VIEWPORT_DIMS': 2,
160 'GL_MODELVIEW_MATRIX': 16,
161 'GL_MODELVIEW_STACK_DEPTH' : 1,
162 'GL_NAME_STACK_DEPTH' : 1,
163 'GL_NORMAL_ARRAY' : 1,
164 'GL_NORMAL_ARRAY_STRIDE' : 1,
165 'GL_NORMAL_ARRAY_TYPE' : 1,
166 'GL_NORMALIZE' : 1,
167 'GL_PACK_ALIGNMENT' : 1,
168 'GL_PACK_LSB_FIRST' : 1,
169 'GL_PACK_ROW_LENGTH' : 1,
170 'GL_PACK_SKIP_PIXELS' : 1,
171 'GL_PACK_SKIP_ROWS' : 1,
172 'GL_PACK_SWAP_BYTES' : 1,
173 'GL_PERSPECTIVE_CORRECTION_HINT' : 1,
174 'GL_PIXEL_MAP_A_TO_A_SIZE' : 1,
175 'GL_PIXEL_MAP_B_TO_B_SIZE' : 1,
176 'GL_PIXEL_MAP_G_TO_G_SIZE' : 1,
177 'GL_PIXEL_MAP_I_TO_A_SIZE' : 1,
178 'GL_PIXEL_MAP_I_TO_B_SIZE' : 1,
179 'GL_PIXEL_MAP_I_TO_G_SIZE' : 1,
180 'GL_PIXEL_MAP_I_TO_I_SIZE' : 1,
181 'GL_PIXEL_MAP_I_TO_R_SIZE' : 1,
182 'GL_PIXEL_MAP_R_TO_R_SIZE' : 1,
183 'GL_PIXEL_MAP_S_TO_S_SIZE' : 1,
184 'GL_POINT_SIZE' : 1,
185 'GL_POINT_SIZE_GRANULARITY' : 1,
186 'GL_POINT_SIZE_RANGE': 2,
187 'GL_POINT_SMOOTH' : 1,
188 'GL_POINT_SMOOTH_HINT' : 1,
189 'GL_POLYGON_MODE': 2,
190 'GL_POLYGON_OFFSET_FACTOR' : 1,
191 'GL_POLYGON_OFFSET_UNITS' : 1,
192 'GL_POLYGON_OFFSET_FILL' : 1,
193 'GL_POLYGON_OFFSET_LINE' : 1,
194 'GL_POLYGON_OFFSET_POINT' : 1,
195 'GL_POLYGON_SMOOTH' : 1,
196 'GL_POLYGON_SMOOTH_HINT' : 1,
197 'GL_POLYGON_STIPPLE' : 1,
198 'GL_PROJECTION_MATRIX': 16,
199 'GL_PROJECTION_STACK_DEPTH' : 1,
200 'GL_READ_BUFFER' : 1,
201 'GL_RED_BIAS' : 1,
202 'GL_RED_BITS' : 1,
203 'GL_RED_SCALE' : 1,
204 'GL_RENDER_MODE' : 1,
205 'GL_RGBA_MODE' : 1,
206 'GL_SCISSOR_BOX': 4,
207 'GL_SCISSOR_TEST' : 1,
208 'GL_SELECTION_BUFFER_SIZE' : 1,
209 'GL_SHADE_MODEL' : 1,
210 'GL_STENCIL_BITS' : 1,
211 'GL_STENCIL_CLEAR_VALUE' : 1,
212 'GL_STENCIL_FAIL' : 1,
213 'GL_STENCIL_FUNC' : 1,
214 'GL_STENCIL_PASS_DEPTH_FAIL' : 1,
215 'GL_STENCIL_PASS_DEPTH_PASS' : 1,
216 'GL_STENCIL_REF' : 1,
217 'GL_STENCIL_TEST' : 1,
218 'GL_STENCIL_VALUE_MASK' : 1,
219 'GL_STENCIL_WRITEMASK' : 1,
220 'GL_STEREO' : 1,
221 'GL_SUBPIXEL_BITS' : 1,
222 'GL_TEXTURE_1D' : 1,
223 'GL_TEXTURE_2D' : 1,
224 'GL_TEXTURE_BINDING_1D' : 1,
225 'GL_TEXTURE_BINDING_2D' : 1,
226 'GL_TEXTURE_BINDING_3D' : 1,
227 'GL_TEXTURE_COORD_ARRAY' : 1,
228 'GL_TEXTURE_COORD_ARRAY_SIZE' : 1,
229 'GL_TEXTURE_COORD_ARRAY_STRIDE' : 1,
230 'GL_TEXTURE_COORD_ARRAY_TYPE' : 1,
231 'GL_TEXTURE_ENV_COLOR': 4,
232 'GL_TEXTURE_ENV_MODE' : 1,
233 'GL_TEXTURE_GEN_Q' : 1,
234 'GL_TEXTURE_GEN_R' : 1,
235 'GL_TEXTURE_GEN_S' : 1,
236 'GL_TEXTURE_GEN_T' : 1,
237 'GL_TEXTURE_MATRIX': 16,
238 'GL_TEXTURE_STACK_DEPTH' : 1,
239 'GL_UNPACK_ALIGNMENT' : 1,
240 'GL_UNPACK_LSB_FIRST' : 1,
241 'GL_UNPACK_ROW_LENGTH' : 1,
242 'GL_UNPACK_SKIP_PIXELS' : 1,
243 'GL_UNPACK_SKIP_ROWS' : 1,
244 'GL_UNPACK_SWAP_BYTES' : 1,
245 'GL_VERTEX_ARRAY' : 1,
246 'GL_VERTEX_ARRAY_SIZE' : 1,
247 'GL_VERTEX_ARRAY_STRIDE' : 1,
248 'GL_VERTEX_ARRAY_TYPE' : 1,
249 'GL_VIEWPORT': 4,
250 'GL_ZOOM_X' : 1,
251 'GL_ZOOM_Y' : 1,
252}
253
254extensions_num_get_values = {
255 'GL_BLEND_COLOR_EXT': (4, 'CR_EXT_blend_color'),
256 'GL_BLEND_EQUATION_EXT': (1, 'CR_EXT_blend_minmax'),
257 'GL_BLEND_SRC_RGB_EXT': (1, 'CR_EXT_blend_func_separate'),
258 'GL_BLEND_DST_RGB_EXT': (1, 'CR_EXT_blend_func_separate'),
259 'GL_BLEND_SRC_ALPHA_EXT': (1, 'CR_EXT_blend_func_separate'),
260 'GL_BLEND_DST_ALPHA_EXT': (1, 'CR_EXT_blend_func_separate'),
261 'GL_FOG_DISTANCE_MODE_NV': (1, 'CR_NV_fog_distance'),
262 'GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB': (1, 'CR_ARB_texture_cube_map'),
263 'GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT': (1, 'CR_EXT_texture_filter_anisotropic'),
264 'GL_TEXTURE_BINDING_CUBE_MAP_ARB': (1, 'CR_ARB_texture_cube_map'),
265 'GL_TEXTURE_CUBE_MAP_ARB': (1, 'CR_ARB_texture_cube_map'),
266 'GL_ACTIVE_TEXTURE_ARB': (1, 'CR_ARB_multitexture'),
267 'GL_CLIENT_ACTIVE_TEXTURE_ARB': (1, 'CR_ARB_multitexture'),
268 'GL_MAX_TEXTURE_UNITS_ARB': (1, 'CR_ARB_multitexture'),
269 'GL_NUM_GENERAL_COMBINERS_NV': (1, 'CR_NV_register_combiners'),
270 'GL_MAX_GENERAL_COMBINERS_NV': (1, 'CR_NV_register_combiners'),
271 'GL_COLOR_SUM_CLAMP_NV': (1, 'CR_NV_register_combiners'),
272 'GL_CONSTANT_COLOR0_NV': (4, 'CR_NV_register_combiners'),
273 'GL_CONSTANT_COLOR1_NV': (4, 'CR_NV_register_combiners'),
274 'GL_PER_STAGE_CONSTANTS_NV': (1, 'CR_NV_register_combiners2'),
275 'GL_LIGHT_MODEL_COLOR_CONTROL_EXT': (1, 'CR_EXT_separate_specular_color'),
276 'GL_COLOR_SUM_EXT': (1, 'CR_EXT_secondary_color'),
277 'GL_CURRENT_SECONDARY_COLOR_EXT': (4, 'CR_EXT_secondary_color'),
278 'GL_SECONDARY_COLOR_ARRAY_SIZE_EXT': (1, 'CR_EXT_secondary_color'),
279 'GL_SECONDARY_COLOR_ARRAY_TYPE_EXT': (1, 'CR_EXT_secondary_color'),
280 'GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT': (1, 'CR_EXT_secondary_color'),
281 'GL_RESCALE_NORMAL': (1, 'CR_OPENGL_VERSION_1_2'),
282 'GL_NUM_COMPRESSED_TEXTURE_FORMATS': (1, 'CR_ARB_texture_compression'),
283 'GL_TEXTURE_3D': (1, 'CR_OPENGL_VERSION_1_2'),
284 'GL_LIGHT_MODEL_COLOR_CONTROL': (1, 'CR_OPENGL_VERSION_1_2'),
285 'GL_UNPACK_IMAGE_HEIGHT': (1, 'CR_OPENGL_VERSION_1_2'),
286 'GL_UNPACK_SKIP_IMAGES': (1, 'CR_OPENGL_VERSION_1_2'),
287 'GL_PACK_IMAGE_HEIGHT': (1, 'CR_OPENGL_VERSION_1_2'),
288 'GL_PACK_SKIP_IMAGES': (1, 'CR_OPENGL_VERSION_1_2'),
289 'GL_ALIASED_POINT_SIZE_RANGE': (2, 'CR_OPENGL_VERSION_1_2'),
290 'GL_ALIASED_LINE_WIDTH_RANGE': (2, 'CR_OPENGL_VERSION_1_2'),
291 'GL_MAX_ELEMENTS_INDICES': (1, 'CR_OPENGL_VERSION_1_2'),
292 'GL_MAX_ELEMENTS_VERTICES': (1, 'CR_OPENGL_VERSION_1_2'),
293 'GL_MULTISAMPLE_ARB': (1, 'CR_ARB_multisample'),
294 'GL_SAMPLE_ALPHA_TO_COVERAGE_ARB': (1, 'CR_ARB_multisample'),
295 'GL_SAMPLE_ALPHA_TO_ONE_ARB': (1, 'CR_ARB_multisample'),
296 'GL_SAMPLE_COVERAGE_ARB': (1, 'CR_ARB_multisample'),
297 'GL_SAMPLE_BUFFERS_ARB': (1, 'CR_ARB_multisample'),
298 'GL_SAMPLES_ARB': (1, 'CR_ARB_multisample'),
299 'GL_SAMPLE_COVERAGE_VALUE_ARB': (1, 'CR_ARB_multisample'),
300 'GL_SAMPLE_COVERAGE_INVERT_ARB': (1, 'CR_ARB_multisample'),
301 'GL_POINT_SPRITE_ARB': (1, 'CR_ARB_point_sprite'),
302 'GL_MAX_TEXTURE_LOD_BIAS_EXT': (1, 'CR_EXT_texture_lod_bias'),
303 'GL_COMPRESSED_TEXTURE_FORMATS_ARB': (1, 'CR_ARB_texture_compression'),
304 'GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB': (1, 'CR_ARB_texture_compression'),
305 'GL_PROGRAM_ERROR_POSITION_NV': (1, 'CR_NV_vertex_program'),
306 'GL_VERTEX_PROGRAM_BINDING_NV': (1, 'CR_NV_vertex_program'),
307 'GL_MAX_VERTEX_ATTRIBS_ARB': (1, 'CR_ARB_vertex_program'),
308 'GL_MAX_TEXTURE_COORDS_ARB': (1, 'CR_ARB_vertex_program'),
309 'GL_PROGRAM_ERROR_POSITION_NV': (1, 'CR_NV_fragment_program'),
310 'GL_FRAGMENT_PROGRAM_BINDING_NV': (1, 'CR_NV_fragment_program'),
311 'GL_MAX_RECTANGLE_TEXTURE_SIZE_NV': (1, 'CR_NV_texture_rectangle'),
312 'GL_TEXTURE_RECTANGLE_NV': (1, 'CR_NV_texture_rectangle'),
313 'GL_TEXTURE_BINDING_RECTANGLE_NV': (1, 'CR_NV_texture_rectangle'),
314 'GL_CLIP_VOLUME_CLIPPING_HINT_EXT' : (3, 'CR_EXT_clip_volume_hint'),
315 'GL_RASTER_POSITION_UNCLIPPED_IBM' : (1, 'CR_IBM_rasterpos_clip'),
316 'GL_GENERATE_MIPMAP_HINT_SGIS' : (1, 'CR_SGIS_generate_mipmap'),
317 'GL_CURRENT_FOG_COORDINATE_EXT' : (1, 'CR_EXT_fog_coord'),
318 'GL_FOG_COORDINATE_ARRAY_TYPE_EXT' : (1, 'CR_EXT_fog_coord'),
319 'GL_FOG_COORDINATE_ARRAY_STRIDE_EXT' : (1, 'CR_EXT_fog_coord'),
320 'GL_TRANSPOSE_COLOR_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
321 'GL_TRANSPOSE_MODELVIEW_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
322 'GL_TRANSPOSE_PROJECTION_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
323 'GL_TRANSPOSE_TEXTURE_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
324 'GL_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
325 'GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
326 'GL_VERTEX_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
327 'GL_NORMAL_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
328 'GL_COLOR_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
329 'GL_INDEX_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
330 'GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
331 'GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
332 'GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
333 'GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
334 'GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
335 'GL_MAX_TEXTURE_IMAGE_UNITS_ARB': (1, 'CR_ARB_fragment_program'),
336 # We don't support GL_ARB_draw_buffers, but for some reason ubuntu64 8.10 vm queries it on macos host
337 'GL_MAX_DRAW_BUFFERS_ARB': (1, 'VBOX'),
338 # Vertex shaders (2.0) #
339 'GL_MAX_VERTEX_UNIFORM_COMPONENTS': (1, 'CR_OPENGL_VERSION_2_0'),
340 'GL_MAX_VARYING_FLOATS': (1, 'CR_OPENGL_VERSION_2_0'),
341 'GL_MAX_VERTEX_ATTRIBS': (1, 'CR_OPENGL_VERSION_2_0'),
342 'GL_MAX_TEXTURE_IMAGE_UNITS': (1, 'CR_OPENGL_VERSION_2_0'),
343 'GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS': (1, 'CR_OPENGL_VERSION_2_0'),
344 'GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS': (1, 'CR_OPENGL_VERSION_2_0'),
345 'GL_MAX_TEXTURE_COORDS': (1, 'CR_OPENGL_VERSION_2_0'),
346 'GL_VERTEX_PROGRAM_POINT_SIZE': (1, 'CR_OPENGL_VERSION_2_0'),
347 'GL_VERTEX_PROGRAM_TWO_SIDE': (1, 'CR_OPENGL_VERSION_2_0'),
348 # Fragment shaders (2.0) #
349 'GL_MAX_FRAGMENT_UNIFORM_COMPONENTS': (1, 'CR_OPENGL_VERSION_2_0'),
350 'GL_FRAGMENT_SHADER_DERIVATIVE_HINT': (1, 'CR_OPENGL_VERSION_2_0'),
351 # Draw buffers (2.0) #
352 'GL_MAX_DRAW_BUFFERS': (1, 'CR_OPENGL_VERSION_2_0'),
353 'GL_DRAW_BUFFER0': (1, 'CR_OPENGL_VERSION_2_0'),
354 'GL_DRAW_BUFFER1': (1, 'CR_OPENGL_VERSION_2_0'),
355 'GL_DRAW_BUFFER2': (1, 'CR_OPENGL_VERSION_2_0'),
356 'GL_DRAW_BUFFER3': (1, 'CR_OPENGL_VERSION_2_0'),
357 'GL_DRAW_BUFFER4': (1, 'CR_OPENGL_VERSION_2_0'),
358 'GL_DRAW_BUFFER5': (1, 'CR_OPENGL_VERSION_2_0'),
359 'GL_DRAW_BUFFER6': (1, 'CR_OPENGL_VERSION_2_0'),
360 'GL_DRAW_BUFFER7': (1, 'CR_OPENGL_VERSION_2_0'),
361 'GL_DRAW_BUFFER8': (1, 'CR_OPENGL_VERSION_2_0'),
362 'GL_DRAW_BUFFER9': (1, 'CR_OPENGL_VERSION_2_0'),
363 'GL_DRAW_BUFFER10': (1, 'CR_OPENGL_VERSION_2_0'),
364 'GL_DRAW_BUFFER11': (1, 'CR_OPENGL_VERSION_2_0'),
365 'GL_DRAW_BUFFER12': (1, 'CR_OPENGL_VERSION_2_0'),
366 'GL_DRAW_BUFFER13': (1, 'CR_OPENGL_VERSION_2_0'),
367 'GL_DRAW_BUFFER14': (1, 'CR_OPENGL_VERSION_2_0'),
368 'GL_DRAW_BUFFER15': (1, 'CR_OPENGL_VERSION_2_0'),
369 # Point sprite (2.0) #
370 'GL_POINT_SPRITE': (1, 'CR_OPENGL_VERSION_2_0'),
371 # Separate stencil (2.0) #
372 'GL_STENCIL_BACK_FAIL': (1, 'CR_OPENGL_VERSION_2_0'),
373 'GL_STENCIL_BACK_FUNC': (1, 'CR_OPENGL_VERSION_2_0'),
374 'GL_STENCIL_BACK_PASS_DEPTH_FAIL': (1, 'CR_OPENGL_VERSION_2_0'),
375 'GL_STENCIL_BACK_PASS_DEPTH_PASS': (1, 'CR_OPENGL_VERSION_2_0'),
376
377}
378
379get_keys = num_get_values.keys() + extensions_num_get_values.keys()
380get_keys.sort()
381
382print "struct nv_struct { GLenum pname; unsigned int num_values; } num_values_array[] = {"
383for key in get_keys:
384 try:
385 print '\t{ %s, %d },' % (key, num_get_values[key])
386 except KeyError:
387 (nv, ifdef) = extensions_num_get_values[key]
388 print '#ifdef %s' % ifdef
389 print '\t{ %s, %d },' % (key, nv)
390 print '#endif /* %s */' % ifdef
391print "\t{ 0, 0 }"
392print "};"
393
394print """
395static unsigned int __numValues( GLenum pname )
396{
397 struct nv_struct *temp;
398
399 for (temp = num_values_array; temp->num_values != 0 ; temp++)
400 {
401 if (temp->pname == pname)
402 return temp->num_values;
403 }
404 crWarning( "Invalid pname to __numValues: 0x%x\\n", (int) pname );
405 return 0;
406}
407"""
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette