1 /* -*- mode: c; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 3; coding: utf-8-unix -*- */
3 * (C) Copyright IBM Corporation 2004
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 * on the rights to use, copy, modify, merge, publish, distribute, sub
10 * license, and/or sell copies of the Software, and to permit persons to whom
11 * the Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
20 * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
21 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
23 * USE OR OTHER DEALINGS IN THE SOFTWARE.
30 TransposeMatrixf(const GLfloat s
[16], GLfloat d
[16])
33 for (i
= 0; i
< 4; i
++) {
34 for (j
= 0; j
< 4; j
++) {
35 d
[i
* 4 + j
] = s
[j
* 4 + i
];
41 TransposeMatrixd(const GLdouble s
[16], GLdouble d
[16])
44 for (i
= 0; i
< 4; i
++) {
45 for (j
= 0; j
< 4; j
++) {
46 d
[i
* 4 + j
] = s
[j
* 4 + i
];
53 __indirect_glLoadTransposeMatrixdARB(const GLdouble
* m
)
57 TransposeMatrixd(m
, mt
);
58 __indirect_glLoadMatrixd(mt
);
62 __indirect_glLoadTransposeMatrixfARB(const GLfloat
* m
)
66 TransposeMatrixf(m
, mt
);
67 __indirect_glLoadMatrixf(mt
);
71 __indirect_glMultTransposeMatrixdARB(const GLdouble
* m
)
75 TransposeMatrixd(m
, mt
);
76 __indirect_glMultMatrixd(mt
);
80 __indirect_glMultTransposeMatrixfARB(const GLfloat
* m
)
84 TransposeMatrixf(m
, mt
);
85 __indirect_glMultMatrixf(mt
);