VirtualBox

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

最後變更 在這個檔案從43031是 41930,由 vboxsync 提交於 12 年 前

crOpenGL: missing glGet constants

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 16.8 KB
 
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 #GL_ARB_IMAGING which is part of 1.2.1
253 'GL_COLOR_MATRIX' : 16,
254 'GL_COLOR_MATRIX_STACK_DEPTH' : 1,
255 'GL_COLOR_TABLE' : 1,
256 'GL_POST_CONVOLUTION_COLOR_TABLE' : 1,
257 'GL_POST_COLOR_MATRIX_COLOR_TABLE' : 1,
258 'GL_PROXY_COLOR_TABLE' : 1,
259 'GL_CONVOLUTION_1D' : 1,
260 'GL_CONVOLUTION_2D' : 1,
261 'GL_SEPARABLE_2D' : 1,
262 'GL_POST_CONVOLUTION_RED_SCALE' : 1,
263 'GL_POST_CONVOLUTION_GREEN_SCALE' : 1,
264 'GL_POST_CONVOLUTION_BLUE_SCALE' : 1,
265 'GL_POST_CONVOLUTION_ALPHA_SCALE' : 1,
266 'GL_POST_CONVOLUTION_RED_BIAS' : 1,
267 'GL_POST_CONVOLUTION_GREEN_BIAS' : 1,
268 'GL_POST_CONVOLUTION_BLUE_BIAS' : 1,
269 'GL_POST_CONVOLUTION_ALPHA_BIAS' : 1,
270 'GL_HISTOGRAM' : 1,
271 'GL_MINMAX' : 1,
272 'GL_MAX_COLOR_MATRIX_STACK_DEPTH' : 1,
273 'GL_MAX_CONVOLUTION_WIDTH' : 1,
274 'GL_MAX_CONVOLUTION_HEIGHT' : 1,
275}
276
277extensions_num_get_values = {
278 'GL_BLEND_COLOR_EXT': (4, 'CR_EXT_blend_color'),
279 'GL_BLEND_EQUATION_EXT': (1, 'CR_EXT_blend_minmax'),
280 'GL_BLEND_SRC_RGB_EXT': (1, 'CR_EXT_blend_func_separate'),
281 'GL_BLEND_DST_RGB_EXT': (1, 'CR_EXT_blend_func_separate'),
282 'GL_BLEND_SRC_ALPHA_EXT': (1, 'CR_EXT_blend_func_separate'),
283 'GL_BLEND_DST_ALPHA_EXT': (1, 'CR_EXT_blend_func_separate'),
284 'GL_FOG_DISTANCE_MODE_NV': (1, 'CR_NV_fog_distance'),
285 'GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB': (1, 'CR_ARB_texture_cube_map'),
286 'GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT': (1, 'CR_EXT_texture_filter_anisotropic'),
287 'GL_TEXTURE_BINDING_CUBE_MAP_ARB': (1, 'CR_ARB_texture_cube_map'),
288 'GL_TEXTURE_CUBE_MAP_ARB': (1, 'CR_ARB_texture_cube_map'),
289 'GL_ACTIVE_TEXTURE_ARB': (1, 'CR_ARB_multitexture'),
290 'GL_CLIENT_ACTIVE_TEXTURE_ARB': (1, 'CR_ARB_multitexture'),
291 'GL_MAX_TEXTURE_UNITS_ARB': (1, 'CR_ARB_multitexture'),
292 'GL_NUM_GENERAL_COMBINERS_NV': (1, 'CR_NV_register_combiners'),
293 'GL_MAX_GENERAL_COMBINERS_NV': (1, 'CR_NV_register_combiners'),
294 'GL_COLOR_SUM_CLAMP_NV': (1, 'CR_NV_register_combiners'),
295 'GL_CONSTANT_COLOR0_NV': (4, 'CR_NV_register_combiners'),
296 'GL_CONSTANT_COLOR1_NV': (4, 'CR_NV_register_combiners'),
297 'GL_PER_STAGE_CONSTANTS_NV': (1, 'CR_NV_register_combiners2'),
298 'GL_LIGHT_MODEL_COLOR_CONTROL_EXT': (1, 'CR_EXT_separate_specular_color'),
299 'GL_COLOR_SUM_EXT': (1, 'CR_EXT_secondary_color'),
300 'GL_CURRENT_SECONDARY_COLOR_EXT': (4, 'CR_EXT_secondary_color'),
301 'GL_SECONDARY_COLOR_ARRAY_SIZE_EXT': (1, 'CR_EXT_secondary_color'),
302 'GL_SECONDARY_COLOR_ARRAY_TYPE_EXT': (1, 'CR_EXT_secondary_color'),
303 'GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT': (1, 'CR_EXT_secondary_color'),
304 'GL_RESCALE_NORMAL': (1, 'CR_OPENGL_VERSION_1_2'),
305 'GL_NUM_COMPRESSED_TEXTURE_FORMATS': (1, 'CR_ARB_texture_compression'),
306 'GL_TEXTURE_3D': (1, 'CR_OPENGL_VERSION_1_2'),
307 'GL_LIGHT_MODEL_COLOR_CONTROL': (1, 'CR_OPENGL_VERSION_1_2'),
308 'GL_UNPACK_IMAGE_HEIGHT': (1, 'CR_OPENGL_VERSION_1_2'),
309 'GL_UNPACK_SKIP_IMAGES': (1, 'CR_OPENGL_VERSION_1_2'),
310 'GL_PACK_IMAGE_HEIGHT': (1, 'CR_OPENGL_VERSION_1_2'),
311 'GL_PACK_SKIP_IMAGES': (1, 'CR_OPENGL_VERSION_1_2'),
312 'GL_ALIASED_POINT_SIZE_RANGE': (2, 'CR_OPENGL_VERSION_1_2'),
313 'GL_ALIASED_LINE_WIDTH_RANGE': (2, 'CR_OPENGL_VERSION_1_2'),
314 'GL_MAX_ELEMENTS_INDICES': (1, 'CR_OPENGL_VERSION_1_2'),
315 'GL_MAX_ELEMENTS_VERTICES': (1, 'CR_OPENGL_VERSION_1_2'),
316 'GL_MULTISAMPLE_ARB': (1, 'CR_ARB_multisample'),
317 'GL_SAMPLE_ALPHA_TO_COVERAGE_ARB': (1, 'CR_ARB_multisample'),
318 'GL_SAMPLE_ALPHA_TO_ONE_ARB': (1, 'CR_ARB_multisample'),
319 'GL_SAMPLE_COVERAGE_ARB': (1, 'CR_ARB_multisample'),
320 'GL_SAMPLE_BUFFERS_ARB': (1, 'CR_ARB_multisample'),
321 'GL_SAMPLES_ARB': (1, 'CR_ARB_multisample'),
322 'GL_SAMPLE_COVERAGE_VALUE_ARB': (1, 'CR_ARB_multisample'),
323 'GL_SAMPLE_COVERAGE_INVERT_ARB': (1, 'CR_ARB_multisample'),
324 'GL_POINT_SPRITE_ARB': (1, 'CR_ARB_point_sprite'),
325 'GL_MAX_TEXTURE_LOD_BIAS_EXT': (1, 'CR_EXT_texture_lod_bias'),
326 'GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB': (1, 'CR_ARB_texture_compression'),
327 'GL_PROGRAM_ERROR_POSITION_NV': (1, 'CR_NV_vertex_program'),
328 'GL_VERTEX_PROGRAM_BINDING_NV': (1, 'CR_NV_vertex_program'),
329 'GL_MAX_VERTEX_ATTRIBS_ARB': (1, 'CR_ARB_vertex_program'),
330 'GL_MAX_TEXTURE_COORDS_ARB': (1, 'CR_ARB_vertex_program'),
331 'GL_PROGRAM_ERROR_POSITION_NV': (1, 'CR_NV_fragment_program'),
332 'GL_FRAGMENT_PROGRAM_BINDING_NV': (1, 'CR_NV_fragment_program'),
333 'GL_MAX_RECTANGLE_TEXTURE_SIZE_NV': (1, 'CR_NV_texture_rectangle'),
334 'GL_TEXTURE_RECTANGLE_NV': (1, 'CR_NV_texture_rectangle'),
335 'GL_TEXTURE_BINDING_RECTANGLE_NV': (1, 'CR_NV_texture_rectangle'),
336 'GL_CLIP_VOLUME_CLIPPING_HINT_EXT' : (3, 'CR_EXT_clip_volume_hint'),
337 'GL_RASTER_POSITION_UNCLIPPED_IBM' : (1, 'CR_IBM_rasterpos_clip'),
338 'GL_GENERATE_MIPMAP_HINT_SGIS' : (1, 'CR_SGIS_generate_mipmap'),
339 'GL_CURRENT_FOG_COORDINATE_EXT' : (1, 'CR_EXT_fog_coord'),
340 'GL_FOG_COORDINATE_ARRAY_TYPE_EXT' : (1, 'CR_EXT_fog_coord'),
341 'GL_FOG_COORDINATE_ARRAY_STRIDE_EXT' : (1, 'CR_EXT_fog_coord'),
342 'GL_TRANSPOSE_COLOR_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
343 'GL_TRANSPOSE_MODELVIEW_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
344 'GL_TRANSPOSE_PROJECTION_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
345 'GL_TRANSPOSE_TEXTURE_MATRIX_ARB': (16, 'CR_ARB_transpose_matrix'),
346 'GL_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
347 'GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
348 'GL_VERTEX_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
349 'GL_NORMAL_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
350 'GL_COLOR_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
351 'GL_INDEX_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
352 'GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
353 'GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
354 'GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
355 'GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
356 'GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB': (1, 'CR_ARB_vertex_buffer_object'),
357 'GL_MAX_TEXTURE_IMAGE_UNITS_ARB': (1, 'CR_ARB_fragment_program'),
358 # We don't support GL_ARB_draw_buffers, but for some reason ubuntu64 8.10 vm queries it on macos host
359 'GL_MAX_DRAW_BUFFERS_ARB': (1, 'VBOX'),
360 'GL_MAX_PROGRAM_MATRICES_ARB': (1, 'CR_ARB_vertex_program'),
361 'GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB': (1, 'CR_ARB_vertex_program'),
362 # Vertex shaders (2.0) #
363 'GL_MAX_VERTEX_UNIFORM_COMPONENTS': (1, 'CR_OPENGL_VERSION_2_0'),
364 'GL_MAX_VARYING_FLOATS': (1, 'CR_OPENGL_VERSION_2_0'),
365 'GL_MAX_VERTEX_ATTRIBS': (1, 'CR_OPENGL_VERSION_2_0'),
366 'GL_MAX_TEXTURE_IMAGE_UNITS': (1, 'CR_OPENGL_VERSION_2_0'),
367 'GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS': (1, 'CR_OPENGL_VERSION_2_0'),
368 'GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS': (1, 'CR_OPENGL_VERSION_2_0'),
369 'GL_MAX_TEXTURE_COORDS': (1, 'CR_OPENGL_VERSION_2_0'),
370 'GL_VERTEX_PROGRAM_POINT_SIZE': (1, 'CR_OPENGL_VERSION_2_0'),
371 'GL_VERTEX_PROGRAM_TWO_SIDE': (1, 'CR_OPENGL_VERSION_2_0'),
372 # Fragment shaders (2.0) #
373 'GL_MAX_FRAGMENT_UNIFORM_COMPONENTS': (1, 'CR_OPENGL_VERSION_2_0'),
374 'GL_FRAGMENT_SHADER_DERIVATIVE_HINT': (1, 'CR_OPENGL_VERSION_2_0'),
375 # Draw buffers (2.0) #
376 'GL_MAX_DRAW_BUFFERS': (1, 'CR_OPENGL_VERSION_2_0'),
377 'GL_DRAW_BUFFER0': (1, 'CR_OPENGL_VERSION_2_0'),
378 'GL_DRAW_BUFFER1': (1, 'CR_OPENGL_VERSION_2_0'),
379 'GL_DRAW_BUFFER2': (1, 'CR_OPENGL_VERSION_2_0'),
380 'GL_DRAW_BUFFER3': (1, 'CR_OPENGL_VERSION_2_0'),
381 'GL_DRAW_BUFFER4': (1, 'CR_OPENGL_VERSION_2_0'),
382 'GL_DRAW_BUFFER5': (1, 'CR_OPENGL_VERSION_2_0'),
383 'GL_DRAW_BUFFER6': (1, 'CR_OPENGL_VERSION_2_0'),
384 'GL_DRAW_BUFFER7': (1, 'CR_OPENGL_VERSION_2_0'),
385 'GL_DRAW_BUFFER8': (1, 'CR_OPENGL_VERSION_2_0'),
386 'GL_DRAW_BUFFER9': (1, 'CR_OPENGL_VERSION_2_0'),
387 'GL_DRAW_BUFFER10': (1, 'CR_OPENGL_VERSION_2_0'),
388 'GL_DRAW_BUFFER11': (1, 'CR_OPENGL_VERSION_2_0'),
389 'GL_DRAW_BUFFER12': (1, 'CR_OPENGL_VERSION_2_0'),
390 'GL_DRAW_BUFFER13': (1, 'CR_OPENGL_VERSION_2_0'),
391 'GL_DRAW_BUFFER14': (1, 'CR_OPENGL_VERSION_2_0'),
392 'GL_DRAW_BUFFER15': (1, 'CR_OPENGL_VERSION_2_0'),
393 # Point sprite (2.0) #
394 'GL_POINT_SPRITE': (1, 'CR_OPENGL_VERSION_2_0'),
395 # Separate stencil (2.0) #
396 'GL_STENCIL_BACK_FAIL': (1, 'CR_OPENGL_VERSION_2_0'),
397 'GL_STENCIL_BACK_FUNC': (1, 'CR_OPENGL_VERSION_2_0'),
398 'GL_STENCIL_BACK_PASS_DEPTH_FAIL': (1, 'CR_OPENGL_VERSION_2_0'),
399 'GL_STENCIL_BACK_PASS_DEPTH_PASS': (1, 'CR_OPENGL_VERSION_2_0'),
400 # Frame buffer object EXT #
401 'GL_FRAMEBUFFER_BINDING_EXT': (1, 'CR_EXT_framebuffer_object'),
402 'GL_RENDERBUFFER_BINDING_EXT': (1, 'CR_EXT_framebuffer_object'),
403 'GL_MAX_COLOR_ATTACHMENTS_EXT': (1, 'CR_EXT_framebuffer_object'),
404 'GL_MAX_RENDERBUFFER_SIZE_EXT': (1, 'CR_EXT_framebuffer_object'),
405 # ARB_shader_objects
406 'GL_CURRENT_PROGRAM': (1, 'CR_ARB_shader_objects'),
407}
408
409get_keys = num_get_values.keys() + extensions_num_get_values.keys()
410get_keys.sort()
411
412print "struct nv_struct { GLenum pname; unsigned int num_values; } num_values_array[] = {"
413for key in get_keys:
414 try:
415 print '\t{ %s, %d },' % (key, num_get_values[key])
416 except KeyError:
417 (nv, ifdef) = extensions_num_get_values[key]
418 print '#ifdef %s' % ifdef
419 print '\t{ %s, %d },' % (key, nv)
420 print '#endif /* %s */' % ifdef
421print "\t{ 0, 0 }"
422print "};"
423
424print """
425static unsigned int __numValues( GLenum pname )
426{
427 struct nv_struct *temp;
428
429 for (temp = num_values_array; temp->num_values != 0 ; temp++)
430 {
431 if (temp->pname == pname)
432 return temp->num_values;
433 }
434 crDebug( "Invalid pname to __numValues: 0x%x\\n", (int) pname );
435 return 0;
436}
437"""
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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