Lots of GLchan datatype changes.
[mesa.git] / src / mesa / math / m_translate.c
1 /* $Id: m_translate.c,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.5
6 *
7 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27 /*
28 * New (3.1) transformation code written by Keith Whitwell.
29 */
30
31
32 #include "glheader.h"
33 #include "colormac.h"
34 #include "mem.h"
35 #include "mmath.h"
36
37 #include "m_translate.h"
38
39
40
41 typedef void (*trans_1f_func)(GLfloat *to,
42 CONST void *ptr,
43 GLuint stride,
44 GLuint start,
45 GLuint n );
46
47 typedef void (*trans_1ui_func)(GLuint *to,
48 CONST void *ptr,
49 GLuint stride,
50 GLuint start,
51 GLuint n );
52
53 typedef void (*trans_1ub_func)(GLubyte *to,
54 CONST void *ptr,
55 GLuint stride,
56 GLuint start,
57 GLuint n );
58
59 typedef void (*trans_4ub_func)(GLubyte (*to)[4],
60 CONST void *ptr,
61 GLuint stride,
62 GLuint start,
63 GLuint n );
64
65 typedef void (*trans_4us_func)(GLushort (*to)[4],
66 CONST void *ptr,
67 GLuint stride,
68 GLuint start,
69 GLuint n );
70
71 typedef void (*trans_4f_func)(GLfloat (*to)[4],
72 CONST void *ptr,
73 GLuint stride,
74 GLuint start,
75 GLuint n );
76
77 typedef void (*trans_3f_func)(GLfloat (*to)[3],
78 CONST void *ptr,
79 GLuint stride,
80 GLuint start,
81 GLuint n );
82
83
84
85
86 #define TYPE_IDX(t) ((t) & 0xf)
87 #define MAX_TYPES TYPE_IDX(GL_DOUBLE)+1 /* 0xa + 1 */
88
89
90 /* This macro is used on other systems, so undefine it for this module */
91
92 #undef CHECK
93
94 static trans_1f_func _math_trans_1f_tab[MAX_TYPES];
95 static trans_1ui_func _math_trans_1ui_tab[MAX_TYPES];
96 static trans_1ub_func _math_trans_1ub_tab[MAX_TYPES];
97 static trans_3f_func _math_trans_3f_tab[MAX_TYPES];
98 static trans_4ub_func _math_trans_4ub_tab[5][MAX_TYPES];
99 static trans_4us_func _math_trans_4us_tab[5][MAX_TYPES];
100 static trans_4f_func _math_trans_4f_tab[5][MAX_TYPES];
101
102
103 #define PTR_ELT(ptr, elt) (((SRC *)ptr)[elt])
104
105
106 #define TAB(x) _math_trans##x##_tab
107 #define ARGS GLuint start, GLuint n
108 #define SRC_START start
109 #define DST_START 0
110 #define STRIDE stride
111 #define NEXT_F f += stride
112 #define NEXT_F2
113 #define CHECK
114
115
116
117
118 /* GL_BYTE
119 */
120 #define SRC GLbyte
121 #define SRC_IDX TYPE_IDX(GL_BYTE)
122 #define TRX_3F(f,n) BYTE_TO_FLOAT( PTR_ELT(f,n) )
123 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
124 #define TRX_UB(ub, f,n) ub = BYTE_TO_UBYTE( PTR_ELT(f,n) )
125 #define TRX_US(ch, f,n) ch = BYTE_TO_USHORT( PTR_ELT(f,n) )
126 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
127
128
129 #define SZ 4
130 #define INIT init_trans_4_GLbyte_raw
131 #define DEST_4F trans_4_GLbyte_4f_raw
132 #define DEST_4UB trans_4_GLbyte_4ub_raw
133 #define DEST_4US trans_4_GLbyte_4us_raw
134 #include "m_trans_tmp.h"
135
136 #define SZ 3
137 #define INIT init_trans_3_GLbyte_raw
138 #define DEST_4F trans_3_GLbyte_4f_raw
139 #define DEST_4UB trans_3_GLbyte_4ub_raw
140 #define DEST_4US trans_3_GLbyte_4us_raw
141 #define DEST_3F trans_3_GLbyte_3f_raw
142 #include "m_trans_tmp.h"
143
144 #define SZ 2
145 #define INIT init_trans_2_GLbyte_raw
146 #define DEST_4F trans_2_GLbyte_4f_raw
147 #include "m_trans_tmp.h"
148
149 #define SZ 1
150 #define INIT init_trans_1_GLbyte_raw
151 #define DEST_4F trans_1_GLbyte_4f_raw
152 #define DEST_1UB trans_1_GLbyte_1ub_raw
153 #define DEST_1UI trans_1_GLbyte_1ui_raw
154 #include "m_trans_tmp.h"
155
156 #undef SRC
157 #undef TRX_3F
158 #undef TRX_4F
159 #undef TRX_UB
160 #undef TRX_US
161 #undef TRX_UI
162 #undef SRC_IDX
163
164
165 /* GL_UNSIGNED_BYTE
166 */
167 #define SRC GLubyte
168 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_BYTE)
169 #define TRX_3F(f,n) /* unused */
170 #define TRX_4F(f,n) /* unused */
171 #define TRX_UB(ub, f,n) ub = PTR_ELT(f,n)
172 #define TRX_US(us, f,n) us = UBYTE_TO_USHORT(PTR_ELT(f,n))
173 #define TRX_UI(f,n) (GLuint)PTR_ELT(f,n)
174
175 /* 4ub->4ub handled in special case below.
176 */
177
178 #define SZ 3
179 #define INIT init_trans_3_GLubyte_raw
180 #define DEST_4UB trans_3_GLubyte_4ub_raw
181 #define DEST_4US trans_3_GLubyte_4us_raw
182 #include "m_trans_tmp.h"
183
184
185 #define SZ 1
186 #define INIT init_trans_1_GLubyte_raw
187 #define DEST_1UI trans_1_GLubyte_1ui_raw
188 #define DEST_1UB trans_1_GLubyte_1ub_raw
189 #include "m_trans_tmp.h"
190
191 #undef SRC
192 #undef SRC_IDX
193 #undef TRX_3F
194 #undef TRX_4F
195 #undef TRX_UB
196 #undef TRX_US
197 #undef TRX_UI
198
199
200 /* GL_SHORT
201 */
202 #define SRC GLshort
203 #define SRC_IDX TYPE_IDX(GL_SHORT)
204 #define TRX_3F(f,n) SHORT_TO_FLOAT( PTR_ELT(f,n) )
205 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
206 #define TRX_UB(ub, f,n) ub = SHORT_TO_UBYTE(PTR_ELT(f,n))
207 #define TRX_US(us, f,n) us = SHORT_TO_USHORT(PTR_ELT(f,n))
208 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
209
210
211 #define SZ 4
212 #define INIT init_trans_4_GLshort_raw
213 #define DEST_4F trans_4_GLshort_4f_raw
214 #define DEST_4UB trans_4_GLshort_4ub_raw
215 #define DEST_4US trans_4_GLshort_4us_raw
216 #include "m_trans_tmp.h"
217
218 #define SZ 3
219 #define INIT init_trans_3_GLshort_raw
220 #define DEST_4F trans_3_GLshort_4f_raw
221 #define DEST_4UB trans_3_GLshort_4ub_raw
222 #define DEST_4US trans_3_GLshort_4us_raw
223 #define DEST_3F trans_3_GLshort_3f_raw
224 #include "m_trans_tmp.h"
225
226 #define SZ 2
227 #define INIT init_trans_2_GLshort_raw
228 #define DEST_4F trans_2_GLshort_4f_raw
229 #include "m_trans_tmp.h"
230
231 #define SZ 1
232 #define INIT init_trans_1_GLshort_raw
233 #define DEST_4F trans_1_GLshort_4f_raw
234 #define DEST_1UB trans_1_GLshort_1ub_raw
235 #define DEST_1UI trans_1_GLshort_1ui_raw
236 #include "m_trans_tmp.h"
237
238
239 #undef SRC
240 #undef SRC_IDX
241 #undef TRX_3F
242 #undef TRX_4F
243 #undef TRX_UB
244 #undef TRX_US
245 #undef TRX_UI
246
247
248 /* GL_UNSIGNED_SHORT
249 */
250 #define SRC GLushort
251 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_SHORT)
252 #define TRX_3F(f,n) USHORT_TO_FLOAT( PTR_ELT(f,n) )
253 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
254 #define TRX_UB(ub,f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 8)
255 #define TRX_US(us,f,n) us = (GLushort) (PTR_ELT(f,n) >> 8)
256 #define TRX_UI(f,n) (GLuint) PTR_ELT(f,n)
257
258
259 #define SZ 4
260 #define INIT init_trans_4_GLushort_raw
261 #define DEST_4F trans_4_GLushort_4f_raw
262 #define DEST_4UB trans_4_GLushort_4ub_raw
263 #define DEST_4US trans_4_GLushort_4us_raw
264 #include "m_trans_tmp.h"
265
266 #define SZ 3
267 #define INIT init_trans_3_GLushort_raw
268 #define DEST_4F trans_3_GLushort_4f_raw
269 #define DEST_4UB trans_3_GLushort_4ub_raw
270 #define DEST_4US trans_3_GLushort_4us_raw
271 #define DEST_3F trans_3_GLushort_3f_raw
272 #include "m_trans_tmp.h"
273
274 #define SZ 2
275 #define INIT init_trans_2_GLushort_raw
276 #define DEST_4F trans_2_GLushort_4f_raw
277 #include "m_trans_tmp.h"
278
279 #define SZ 1
280 #define INIT init_trans_1_GLushort_raw
281 #define DEST_4F trans_1_GLushort_4f_raw
282 #define DEST_1UB trans_1_GLushort_1ub_raw
283 #define DEST_1UI trans_1_GLushort_1ui_raw
284 #include "m_trans_tmp.h"
285
286 #undef SRC
287 #undef SRC_IDX
288 #undef TRX_3F
289 #undef TRX_4F
290 #undef TRX_UB
291 #undef TRX_US
292 #undef TRX_UI
293
294
295 /* GL_INT
296 */
297 #define SRC GLint
298 #define SRC_IDX TYPE_IDX(GL_INT)
299 #define TRX_3F(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
300 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
301 #define TRX_UB(ub, f,n) ub = INT_TO_UBYTE(PTR_ELT(f,n))
302 #define TRX_US(us, f,n) us = INT_TO_USHORT(PTR_ELT(f,n))
303 #define TRX_UI(f,n) (PTR_ELT(f,n) < 0 ? 0 : (GLuint) PTR_ELT(f,n))
304
305
306 #define SZ 4
307 #define INIT init_trans_4_GLint_raw
308 #define DEST_4F trans_4_GLint_4f_raw
309 #define DEST_4UB trans_4_GLint_4ub_raw
310 #define DEST_4US trans_4_GLint_4us_raw
311 #include "m_trans_tmp.h"
312
313 #define SZ 3
314 #define INIT init_trans_3_GLint_raw
315 #define DEST_4F trans_3_GLint_4f_raw
316 #define DEST_4UB trans_3_GLint_4ub_raw
317 #define DEST_4US trans_3_GLint_4us_raw
318 #define DEST_3F trans_3_GLint_3f_raw
319 #include "m_trans_tmp.h"
320
321 #define SZ 2
322 #define INIT init_trans_2_GLint_raw
323 #define DEST_4F trans_2_GLint_4f_raw
324 #include "m_trans_tmp.h"
325
326 #define SZ 1
327 #define INIT init_trans_1_GLint_raw
328 #define DEST_4F trans_1_GLint_4f_raw
329 #define DEST_1UB trans_1_GLint_1ub_raw
330 #define DEST_1UI trans_1_GLint_1ui_raw
331 #include "m_trans_tmp.h"
332
333
334 #undef SRC
335 #undef SRC_IDX
336 #undef TRX_3F
337 #undef TRX_4F
338 #undef TRX_UB
339 #undef TRX_US
340 #undef TRX_UI
341
342
343 /* GL_UNSIGNED_INT
344 */
345 #define SRC GLuint
346 #define SRC_IDX TYPE_IDX(GL_UNSIGNED_INT)
347 #define TRX_3F(f,n) INT_TO_FLOAT( PTR_ELT(f,n) )
348 #define TRX_4F(f,n) (GLfloat)( PTR_ELT(f,n) )
349 #define TRX_UB(ub, f,n) ub = (GLubyte) (PTR_ELT(f,n) >> 24)
350 #define TRX_US(us, f,n) us = (GLshort) (PTR_ELT(f,n) >> 16)
351 #define TRX_UI(f,n) PTR_ELT(f,n)
352
353
354 #define SZ 4
355 #define INIT init_trans_4_GLuint_raw
356 #define DEST_4F trans_4_GLuint_4f_raw
357 #define DEST_4UB trans_4_GLuint_4ub_raw
358 #define DEST_4US trans_4_GLuint_4us_raw
359 #include "m_trans_tmp.h"
360
361 #define SZ 3
362 #define INIT init_trans_3_GLuint_raw
363 #define DEST_4F trans_3_GLuint_4f_raw
364 #define DEST_4UB trans_3_GLuint_4ub_raw
365 #define DEST_4US trans_3_GLuint_4us_raw
366 #define DEST_3F trans_3_GLuint_3f_raw
367 #include "m_trans_tmp.h"
368
369 #define SZ 2
370 #define INIT init_trans_2_GLuint_raw
371 #define DEST_4F trans_2_GLuint_4f_raw
372 #include "m_trans_tmp.h"
373
374 #define SZ 1
375 #define INIT init_trans_1_GLuint_raw
376 #define DEST_4F trans_1_GLuint_4f_raw
377 #define DEST_1UB trans_1_GLuint_1ub_raw
378 #define DEST_1UI trans_1_GLuint_1ui_raw
379 #include "m_trans_tmp.h"
380
381 #undef SRC
382 #undef SRC_IDX
383 #undef TRX_3F
384 #undef TRX_4F
385 #undef TRX_UB
386 #undef TRX_US
387 #undef TRX_UI
388
389
390 /* GL_DOUBLE
391 */
392 #define SRC GLdouble
393 #define SRC_IDX TYPE_IDX(GL_DOUBLE)
394 #define TRX_3F(f,n) PTR_ELT(f,n)
395 #define TRX_4F(f,n) PTR_ELT(f,n)
396 #define TRX_UB(ub,f,n) UNCLAMPED_FLOAT_TO_UBYTE(ub, PTR_ELT(f,n))
397 #define TRX_US(us,f,n) UNCLAMPED_FLOAT_TO_USHORT(us, PTR_ELT(f,n))
398 #define TRX_UI(f,n) (GLuint) (GLint) PTR_ELT(f,n)
399 #define TRX_1F(f,n) PTR_ELT(f,n)
400
401
402 #define SZ 4
403 #define INIT init_trans_4_GLdouble_raw
404 #define DEST_4F trans_4_GLdouble_4f_raw
405 #define DEST_4UB trans_4_GLdouble_4ub_raw
406 #define DEST_4US trans_4_GLdouble_4us_raw
407 #include "m_trans_tmp.h"
408
409 #define SZ 3
410 #define INIT init_trans_3_GLdouble_raw
411 #define DEST_4F trans_3_GLdouble_4f_raw
412 #define DEST_4UB trans_3_GLdouble_4ub_raw
413 #define DEST_4US trans_3_GLdouble_4us_raw
414 #define DEST_3F trans_3_GLdouble_3f_raw
415 #include "m_trans_tmp.h"
416
417 #define SZ 2
418 #define INIT init_trans_2_GLdouble_raw
419 #define DEST_4F trans_2_GLdouble_4f_raw
420 #include "m_trans_tmp.h"
421
422 #define SZ 1
423 #define INIT init_trans_1_GLdouble_raw
424 #define DEST_4F trans_1_GLdouble_4f_raw
425 #define DEST_1UB trans_1_GLdouble_1ub_raw
426 #define DEST_1UI trans_1_GLdouble_1ui_raw
427 #define DEST_1F trans_1_GLdouble_1f_raw
428 #include "m_trans_tmp.h"
429
430 #undef SRC
431 #undef SRC_IDX
432
433 /* GL_FLOAT
434 */
435 #define SRC GLfloat
436 #define SRC_IDX TYPE_IDX(GL_FLOAT)
437 #define SZ 4
438 #define INIT init_trans_4_GLfloat_raw
439 #define DEST_4UB trans_4_GLfloat_4ub_raw
440 #define DEST_4US trans_4_GLfloat_4us_raw
441 #define DEST_4F trans_4_GLfloat_4f_raw
442 #include "m_trans_tmp.h"
443
444 #define SZ 3
445 #define INIT init_trans_3_GLfloat_raw
446 #define DEST_4F trans_3_GLfloat_4f_raw
447 #define DEST_4UB trans_3_GLfloat_4ub_raw
448 #define DEST_4US trans_3_GLfloat_4us_raw
449 #define DEST_3F trans_3_GLfloat_3f_raw
450 #include "m_trans_tmp.h"
451
452 #define SZ 2
453 #define INIT init_trans_2_GLfloat_raw
454 #define DEST_4F trans_2_GLfloat_4f_raw
455 #include "m_trans_tmp.h"
456
457 #define SZ 1
458 #define INIT init_trans_1_GLfloat_raw
459 #define DEST_4F trans_1_GLfloat_4f_raw
460 #define DEST_1UB trans_1_GLfloat_1ub_raw
461 #define DEST_1UI trans_1_GLfloat_1ui_raw
462 #define DEST_1F trans_1_GLfloat_1f_raw
463
464 #include "m_trans_tmp.h"
465
466 #undef SRC
467 #undef SRC_IDX
468 #undef TRX_3F
469 #undef TRX_4F
470 #undef TRX_UB
471 #undef TRX_US
472 #undef TRX_UI
473
474
475 static void trans_4_GLubyte_4ub_raw(GLubyte (*t)[4],
476 CONST void *Ptr,
477 GLuint stride,
478 ARGS )
479 {
480 const GLubyte *f = (GLubyte *) Ptr + SRC_START * stride;
481 GLuint i;
482
483 if (((((long) f | (long) stride)) & 3L) == 0L) {
484 /* Aligned.
485 */
486 for (i = DST_START ; i < n ; i++, f += stride) {
487 COPY_4UBV( t[i], f );
488 }
489 } else {
490 for (i = DST_START ; i < n ; i++, f += stride) {
491 t[i][0] = f[0];
492 t[i][1] = f[1];
493 t[i][2] = f[2];
494 t[i][3] = f[3];
495 }
496 }
497 }
498
499
500 static void init_translate_raw(void)
501 {
502 MEMSET( TAB(_1ui), 0, sizeof(TAB(_1ui)) );
503 MEMSET( TAB(_1ub), 0, sizeof(TAB(_1ub)) );
504 MEMSET( TAB(_3f), 0, sizeof(TAB(_3f)) );
505 MEMSET( TAB(_4ub), 0, sizeof(TAB(_4ub)) );
506 MEMSET( TAB(_4us), 0, sizeof(TAB(_4us)) );
507 MEMSET( TAB(_4f), 0, sizeof(TAB(_4f)) );
508
509 TAB(_4ub)[4][TYPE_IDX(GL_UNSIGNED_BYTE)] = trans_4_GLubyte_4ub_raw;
510
511 init_trans_4_GLbyte_raw();
512 init_trans_3_GLbyte_raw();
513 init_trans_2_GLbyte_raw();
514 init_trans_1_GLbyte_raw();
515 init_trans_1_GLubyte_raw();
516 init_trans_3_GLubyte_raw();
517 init_trans_4_GLshort_raw();
518 init_trans_3_GLshort_raw();
519 init_trans_2_GLshort_raw();
520 init_trans_1_GLshort_raw();
521 init_trans_4_GLushort_raw();
522 init_trans_3_GLushort_raw();
523 init_trans_2_GLushort_raw();
524 init_trans_1_GLushort_raw();
525 init_trans_4_GLint_raw();
526 init_trans_3_GLint_raw();
527 init_trans_2_GLint_raw();
528 init_trans_1_GLint_raw();
529 init_trans_4_GLuint_raw();
530 init_trans_3_GLuint_raw();
531 init_trans_2_GLuint_raw();
532 init_trans_1_GLuint_raw();
533 init_trans_4_GLdouble_raw();
534 init_trans_3_GLdouble_raw();
535 init_trans_2_GLdouble_raw();
536 init_trans_1_GLdouble_raw();
537 init_trans_4_GLfloat_raw();
538 init_trans_3_GLfloat_raw();
539 init_trans_2_GLfloat_raw();
540 init_trans_1_GLfloat_raw();
541 }
542
543
544 #undef TAB
545 #undef CLASS
546 #undef ARGS
547 #undef CHECK
548 #undef SRC_START
549 #undef DST_START
550 #undef NEXT_F
551 #undef NEXT_F2
552
553
554
555
556
557 void _math_init_translate( void )
558 {
559 init_translate_raw();
560 }
561
562
563
564 void _math_trans_1f(GLfloat *to,
565 CONST void *ptr,
566 GLuint stride,
567 GLenum type,
568 GLuint start,
569 GLuint n )
570 {
571 _math_trans_1f_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
572 }
573
574 void _math_trans_1ui(GLuint *to,
575 CONST void *ptr,
576 GLuint stride,
577 GLenum type,
578 GLuint start,
579 GLuint n )
580 {
581 _math_trans_1ui_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
582 }
583
584 void _math_trans_1ub(GLubyte *to,
585 CONST void *ptr,
586 GLuint stride,
587 GLenum type,
588 GLuint start,
589 GLuint n )
590 {
591 _math_trans_1ub_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
592 }
593
594
595 void _math_trans_4ub(GLubyte (*to)[4],
596 CONST void *ptr,
597 GLuint stride,
598 GLenum type,
599 GLuint size,
600 GLuint start,
601 GLuint n )
602 {
603 _math_trans_4ub_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
604 }
605
606 void _math_trans_4us(GLushort (*to)[4],
607 CONST void *ptr,
608 GLuint stride,
609 GLenum type,
610 GLuint size,
611 GLuint start,
612 GLuint n )
613 {
614 _math_trans_4us_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
615 }
616
617 void _math_trans_4f(GLfloat (*to)[4],
618 CONST void *ptr,
619 GLuint stride,
620 GLenum type,
621 GLuint size,
622 GLuint start,
623 GLuint n )
624 {
625 _math_trans_4f_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
626 }
627
628 void _math_trans_3f(GLfloat (*to)[3],
629 CONST void *ptr,
630 GLuint stride,
631 GLenum type,
632 GLuint start,
633 GLuint n )
634 {
635 _math_trans_3f_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
636 }
637