Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4358 | Serge | 1 | |
2 | * Mesa 3-D graphics library |
||
3 | * |
||
4 | * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. |
||
5 | * |
||
6 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
7 | * copy of this software and associated documentation files (the "Software"), |
||
8 | * to deal in the Software without restriction, including without limitation |
||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
10 | * and/or sell copies of the Software, and to permit persons to whom the |
||
11 | * Software is furnished to do so, subject to the following conditions: |
||
12 | * |
||
13 | * The above copyright notice and this permission notice shall be included |
||
14 | * in all copies or substantial portions of the Software. |
||
15 | * |
||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
||
17 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
22 | * OTHER DEALINGS IN THE SOFTWARE. |
||
23 | * |
||
24 | * Authors: |
||
25 | * Gareth Hughes |
||
26 | */ |
||
27 | |||
28 | |||
29 | #define X86_XFORM_H |
||
30 | |||
31 | |||
32 | |||
33 | * Transformation function declarations: |
||
34 | */ |
||
35 | |||
36 | |||
37 | const GLfloat m[16], \ |
||
38 | const GLvector4f *from_vec |
||
39 | |||
40 | |||
41 | extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_general( XFORM_ARGS ); \ |
||
42 | extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_identity( XFORM_ARGS ); \ |
||
43 | extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_3d_no_rot( XFORM_ARGS ); \ |
||
44 | extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_perspective( XFORM_ARGS ); \ |
||
45 | extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_2d( XFORM_ARGS ); \ |
||
46 | extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_2d_no_rot( XFORM_ARGS ); \ |
||
47 | extern void _ASMAPI _mesa_##pfx##_transform_points##sz##_3d( XFORM_ARGS ); |
||
48 | |||
49 | |||
50 | _mesa_transform_tab[sz][MATRIX_GENERAL] = \ |
||
51 | _mesa_##pfx##_transform_points##sz##_general; \ |
||
52 | _mesa_transform_tab[sz][MATRIX_IDENTITY] = \ |
||
53 | _mesa_##pfx##_transform_points##sz##_identity; \ |
||
54 | _mesa_transform_tab[sz][MATRIX_3D_NO_ROT] = \ |
||
55 | _mesa_##pfx##_transform_points##sz##_3d_no_rot; \ |
||
56 | _mesa_transform_tab[sz][MATRIX_PERSPECTIVE] = \ |
||
57 | _mesa_##pfx##_transform_points##sz##_perspective; \ |
||
58 | _mesa_transform_tab[sz][MATRIX_2D] = \ |
||
59 | _mesa_##pfx##_transform_points##sz##_2d; \ |
||
60 | _mesa_transform_tab[sz][MATRIX_2D_NO_ROT] = \ |
||
61 | _mesa_##pfx##_transform_points##sz##_2d_no_rot; \ |
||
62 | _mesa_transform_tab[sz][MATRIX_3D] = \ |
||
63 | _mesa_##pfx##_transform_points##sz##_3d; |
||
64 | |||
65 | |||
66 | |||
67 | * Normal transformation function declarations: |
||
68 | */ |
||
69 | |||
70 | |||
71 | GLfloat scale, \ |
||
72 | const GLvector4f *in, \ |
||
73 | const GLfloat *lengths, \ |
||
74 | GLvector4f *dest |
||
75 | |||
76 | |||
77 | extern void _ASMAPI _mesa_##pfx##_rescale_normals( NORM_ARGS ); \ |
||
78 | extern void _ASMAPI _mesa_##pfx##_normalize_normals( NORM_ARGS ); \ |
||
79 | extern void _ASMAPI _mesa_##pfx##_transform_normals( NORM_ARGS ); \ |
||
80 | extern void _ASMAPI _mesa_##pfx##_transform_normals_no_rot( NORM_ARGS ); \ |
||
81 | extern void _ASMAPI _mesa_##pfx##_transform_rescale_normals( NORM_ARGS ); \ |
||
82 | extern void _ASMAPI _mesa_##pfx##_transform_rescale_normals_no_rot( NORM_ARGS ); \ |
||
83 | extern void _ASMAPI _mesa_##pfx##_transform_normalize_normals( NORM_ARGS ); \ |
||
84 | extern void _ASMAPI _mesa_##pfx##_transform_normalize_normals_no_rot( NORM_ARGS ); |
||
85 | |||
86 | |||
87 | _mesa_normal_tab[NORM_RESCALE] = \ |
||
88 | _mesa_##pfx##_rescale_normals; \ |
||
89 | _mesa_normal_tab[NORM_NORMALIZE] = \ |
||
90 | _mesa_##pfx##_normalize_normals; \ |
||
91 | _mesa_normal_tab[NORM_TRANSFORM] = \ |
||
92 | _mesa_##pfx##_transform_normals; \ |
||
93 | _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] = \ |
||
94 | _mesa_##pfx##_transform_normals_no_rot; \ |
||
95 | _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE] = \ |
||
96 | _mesa_##pfx##_transform_rescale_normals; \ |
||
97 | _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE] = \ |
||
98 | _mesa_##pfx##_transform_rescale_normals_no_rot; \ |
||
99 | _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE] = \ |
||
100 | _mesa_##pfx##_transform_normalize_normals; \ |
||
101 | _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE] = \ |
||
102 | _mesa_##pfx##_transform_normalize_normals_no_rot; |
||
103 | |||
104 | |||
105 | |||
106 |