1/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
2
3/*
4 * (C) Copyright IBM Corporation 2004
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sub license,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
16 * Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
21 * IBM,
22 * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 */
27
28
29#include <X11/Xfuncproto.h>
30#include <GL/gl.h>
31#include "indirect_size.h"
32
33#  if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
34#    define PURE __attribute__((pure))
35#  else
36#    define PURE
37#  endif
38
39#  if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
40#    define FASTCALL __attribute__((fastcall))
41#  else
42#    define FASTCALL
43#  endif
44
45
46#ifdef HAVE_FUNC_ATTRIBUTE_ALIAS
47#  define ALIAS2(from,to) \
48    _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
49        __attribute__ ((alias( # to )));
50#  define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size )
51#else
52#  define ALIAS(from,to) \
53    _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
54    { return __gl ## to ## _size( e ); }
55#endif
56
57
58_X_INTERNAL PURE FASTCALL GLint
59__glCallLists_size( GLenum e )
60{
61    switch( e ) {
62        case GL_BYTE:
63        case GL_UNSIGNED_BYTE:
64            return 1;
65        case GL_SHORT:
66        case GL_UNSIGNED_SHORT:
67        case GL_2_BYTES:
68        case GL_HALF_FLOAT:
69            return 2;
70        case GL_3_BYTES:
71            return 3;
72        case GL_INT:
73        case GL_UNSIGNED_INT:
74        case GL_FLOAT:
75        case GL_4_BYTES:
76            return 4;
77        default: return 0;
78    }
79}
80
81_X_INTERNAL PURE FASTCALL GLint
82__glFogfv_size( GLenum e )
83{
84    switch( e ) {
85        case GL_FOG_INDEX:
86        case GL_FOG_DENSITY:
87        case GL_FOG_START:
88        case GL_FOG_END:
89        case GL_FOG_MODE:
90        case GL_FOG_OFFSET_VALUE_SGIX:
91        case GL_FOG_DISTANCE_MODE_NV:
92            return 1;
93        case GL_FOG_COLOR:
94            return 4;
95        default: return 0;
96    }
97}
98
99_X_INTERNAL PURE FASTCALL GLint
100__glLightfv_size( GLenum e )
101{
102    switch( e ) {
103        case GL_SPOT_EXPONENT:
104        case GL_SPOT_CUTOFF:
105        case GL_CONSTANT_ATTENUATION:
106        case GL_LINEAR_ATTENUATION:
107        case GL_QUADRATIC_ATTENUATION:
108            return 1;
109        case GL_SPOT_DIRECTION:
110            return 3;
111        case GL_AMBIENT:
112        case GL_DIFFUSE:
113        case GL_SPECULAR:
114        case GL_POSITION:
115            return 4;
116        default: return 0;
117    }
118}
119
120_X_INTERNAL PURE FASTCALL GLint
121__glLightModelfv_size( GLenum e )
122{
123    switch( e ) {
124        case GL_LIGHT_MODEL_LOCAL_VIEWER:
125        case GL_LIGHT_MODEL_TWO_SIDE:
126        case GL_LIGHT_MODEL_COLOR_CONTROL:
127/*      case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/
128            return 1;
129        case GL_LIGHT_MODEL_AMBIENT:
130            return 4;
131        default: return 0;
132    }
133}
134
135_X_INTERNAL PURE FASTCALL GLint
136__glMaterialfv_size( GLenum e )
137{
138    switch( e ) {
139        case GL_SHININESS:
140            return 1;
141        case GL_COLOR_INDEXES:
142            return 3;
143        case GL_AMBIENT:
144        case GL_DIFFUSE:
145        case GL_SPECULAR:
146        case GL_EMISSION:
147        case GL_AMBIENT_AND_DIFFUSE:
148            return 4;
149        default: return 0;
150    }
151}
152
153_X_INTERNAL PURE FASTCALL GLint
154__glTexParameterfv_size( GLenum e )
155{
156    switch( e ) {
157        case GL_TEXTURE_MAG_FILTER:
158        case GL_TEXTURE_MIN_FILTER:
159        case GL_TEXTURE_WRAP_S:
160        case GL_TEXTURE_WRAP_T:
161        case GL_TEXTURE_PRIORITY:
162        case GL_TEXTURE_WRAP_R:
163        case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
164/*      case GL_SHADOW_AMBIENT_SGIX:*/
165        case GL_TEXTURE_MIN_LOD:
166        case GL_TEXTURE_MAX_LOD:
167        case GL_TEXTURE_BASE_LEVEL:
168        case GL_TEXTURE_MAX_LEVEL:
169        case GL_TEXTURE_CLIPMAP_FRAME_SGIX:
170        case GL_TEXTURE_LOD_BIAS_S_SGIX:
171        case GL_TEXTURE_LOD_BIAS_T_SGIX:
172        case GL_TEXTURE_LOD_BIAS_R_SGIX:
173        case GL_GENERATE_MIPMAP:
174/*      case GL_GENERATE_MIPMAP_SGIS:*/
175        case GL_TEXTURE_COMPARE_SGIX:
176        case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
177        case GL_TEXTURE_MAX_CLAMP_S_SGIX:
178        case GL_TEXTURE_MAX_CLAMP_T_SGIX:
179        case GL_TEXTURE_MAX_CLAMP_R_SGIX:
180        case GL_TEXTURE_MAX_ANISOTROPY_EXT:
181        case GL_TEXTURE_LOD_BIAS:
182/*      case GL_TEXTURE_LOD_BIAS_EXT:*/
183        case GL_TEXTURE_STORAGE_HINT_APPLE:
184        case GL_STORAGE_PRIVATE_APPLE:
185        case GL_STORAGE_CACHED_APPLE:
186        case GL_STORAGE_SHARED_APPLE:
187        case GL_DEPTH_TEXTURE_MODE:
188/*      case GL_DEPTH_TEXTURE_MODE_ARB:*/
189        case GL_TEXTURE_COMPARE_MODE:
190/*      case GL_TEXTURE_COMPARE_MODE_ARB:*/
191        case GL_TEXTURE_COMPARE_FUNC:
192/*      case GL_TEXTURE_COMPARE_FUNC_ARB:*/
193        case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV:
194            return 1;
195        case GL_TEXTURE_CLIPMAP_CENTER_SGIX:
196        case GL_TEXTURE_CLIPMAP_OFFSET_SGIX:
197            return 2;
198        case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX:
199            return 3;
200        case GL_TEXTURE_BORDER_COLOR:
201        case GL_POST_TEXTURE_FILTER_BIAS_SGIX:
202        case GL_POST_TEXTURE_FILTER_SCALE_SGIX:
203            return 4;
204        default: return 0;
205    }
206}
207
208_X_INTERNAL PURE FASTCALL GLint
209__glTexEnvfv_size( GLenum e )
210{
211    switch( e ) {
212        case GL_ALPHA_SCALE:
213        case GL_TEXTURE_ENV_MODE:
214        case GL_TEXTURE_LOD_BIAS:
215        case GL_COMBINE_RGB:
216        case GL_COMBINE_ALPHA:
217        case GL_RGB_SCALE:
218        case GL_SOURCE0_RGB:
219        case GL_SOURCE1_RGB:
220        case GL_SOURCE2_RGB:
221        case GL_SOURCE3_RGB_NV:
222        case GL_SOURCE0_ALPHA:
223        case GL_SOURCE1_ALPHA:
224        case GL_SOURCE2_ALPHA:
225        case GL_SOURCE3_ALPHA_NV:
226        case GL_OPERAND0_RGB:
227        case GL_OPERAND1_RGB:
228        case GL_OPERAND2_RGB:
229        case GL_OPERAND3_RGB_NV:
230        case GL_OPERAND0_ALPHA:
231        case GL_OPERAND1_ALPHA:
232        case GL_OPERAND2_ALPHA:
233        case GL_OPERAND3_ALPHA_NV:
234        case GL_BUMP_TARGET_ATI:
235        case GL_COORD_REPLACE_ARB:
236/*      case GL_COORD_REPLACE_NV:*/
237            return 1;
238        case GL_TEXTURE_ENV_COLOR:
239            return 4;
240        default: return 0;
241    }
242}
243
244_X_INTERNAL PURE FASTCALL GLint
245__glTexGendv_size( GLenum e )
246{
247    switch( e ) {
248        case GL_TEXTURE_GEN_MODE:
249            return 1;
250        case GL_OBJECT_PLANE:
251        case GL_EYE_PLANE:
252            return 4;
253        default: return 0;
254    }
255}
256
257_X_INTERNAL PURE FASTCALL GLint
258__glMap1d_size( GLenum e )
259{
260    switch( e ) {
261        case GL_MAP1_INDEX:
262        case GL_MAP1_TEXTURE_COORD_1:
263            return 1;
264        case GL_MAP1_TEXTURE_COORD_2:
265            return 2;
266        case GL_MAP1_NORMAL:
267        case GL_MAP1_TEXTURE_COORD_3:
268        case GL_MAP1_VERTEX_3:
269            return 3;
270        case GL_MAP1_COLOR_4:
271        case GL_MAP1_TEXTURE_COORD_4:
272        case GL_MAP1_VERTEX_4:
273            return 4;
274        default: return 0;
275    }
276}
277
278_X_INTERNAL PURE FASTCALL GLint
279__glMap2d_size( GLenum e )
280{
281    switch( e ) {
282        case GL_MAP2_INDEX:
283        case GL_MAP2_TEXTURE_COORD_1:
284            return 1;
285        case GL_MAP2_TEXTURE_COORD_2:
286            return 2;
287        case GL_MAP2_NORMAL:
288        case GL_MAP2_TEXTURE_COORD_3:
289        case GL_MAP2_VERTEX_3:
290            return 3;
291        case GL_MAP2_COLOR_4:
292        case GL_MAP2_TEXTURE_COORD_4:
293        case GL_MAP2_VERTEX_4:
294            return 4;
295        default: return 0;
296    }
297}
298
299_X_INTERNAL PURE FASTCALL GLint
300__glColorTableParameterfv_size( GLenum e )
301{
302    switch( e ) {
303        case GL_COLOR_TABLE_SCALE:
304        case GL_COLOR_TABLE_BIAS:
305            return 4;
306        default: return 0;
307    }
308}
309
310_X_INTERNAL PURE FASTCALL GLint
311__glConvolutionParameterfv_size( GLenum e )
312{
313    switch( e ) {
314        case GL_CONVOLUTION_BORDER_MODE:
315/*      case GL_CONVOLUTION_BORDER_MODE_EXT:*/
316            return 1;
317        case GL_CONVOLUTION_FILTER_SCALE:
318/*      case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
319        case GL_CONVOLUTION_FILTER_BIAS:
320/*      case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
321        case GL_CONVOLUTION_BORDER_COLOR:
322/*      case GL_CONVOLUTION_BORDER_COLOR_HP:*/
323            return 4;
324        default: return 0;
325    }
326}
327
328_X_INTERNAL PURE FASTCALL GLint
329__glPointParameterfv_size( GLenum e )
330{
331    switch( e ) {
332        case GL_POINT_SIZE_MIN:
333/*      case GL_POINT_SIZE_MIN_ARB:*/
334/*      case GL_POINT_SIZE_MIN_SGIS:*/
335        case GL_POINT_SIZE_MAX:
336/*      case GL_POINT_SIZE_MAX_ARB:*/
337/*      case GL_POINT_SIZE_MAX_SGIS:*/
338        case GL_POINT_FADE_THRESHOLD_SIZE:
339/*      case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/
340/*      case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/
341        case GL_POINT_SPRITE_R_MODE_NV:
342        case GL_POINT_SPRITE_COORD_ORIGIN:
343            return 1;
344        case GL_POINT_DISTANCE_ATTENUATION:
345/*      case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
346/*      case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
347            return 3;
348        default: return 0;
349    }
350}
351
352ALIAS( Fogiv, Fogfv )
353ALIAS( Lightiv, Lightfv )
354ALIAS( LightModeliv, LightModelfv )
355ALIAS( Materialiv, Materialfv )
356ALIAS( TexParameteriv, TexParameterfv )
357ALIAS( TexEnviv, TexEnvfv )
358ALIAS( TexGenfv, TexGendv )
359ALIAS( TexGeniv, TexGendv )
360ALIAS( Map1f, Map1d )
361ALIAS( Map2f, Map2d )
362ALIAS( ColorTableParameteriv, ColorTableParameterfv )
363ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
364ALIAS( PointParameteriv, PointParameterfv )
365
366#  undef PURE
367#  undef FASTCALL
368