Cleanup of derived state calculation prior to seperating software T&L
[mesa.git] / src / mesa / main / matrix.h
1 /* $Id: matrix.h,v 1.8 2000/10/29 18:12:15 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.5
6 *
7 * Copyright (C) 1999-2000 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 #ifndef MATRIX_H
29 #define MATRIX_H
30
31
32 #include "types.h"
33
34
35 #ifdef VMS
36 #define gl_calculate_model_project_matrix gl_calculate_model_project_matr
37 #endif
38
39
40 extern void
41 gl_matrix_transposef( GLfloat to[16], const GLfloat from[16] );
42
43 extern void
44 gl_matrix_transposed( GLdouble to[16], const GLdouble from[16] );
45
46
47 extern void
48 gl_rotation_matrix( GLfloat angle, GLfloat x, GLfloat y, GLfloat z,
49 GLfloat m[] );
50
51
52 extern void
53 gl_calculate_model_project_matrix( GLcontext *ctx );
54
55 extern void
56 gl_matrix_ctr( GLmatrix *m );
57
58 extern void
59 gl_matrix_dtr( GLmatrix *m );
60
61 extern void
62 gl_matrix_alloc_inv( GLmatrix *m );
63
64 extern void
65 gl_matrix_mul( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b );
66
67 extern void
68 gl_matrix_analyze( GLmatrix *mat );
69
70 extern void
71 gl_print_matrix( const GLmatrix *m );
72
73
74
75 extern void
76 _mesa_Frustum( GLdouble left, GLdouble right,
77 GLdouble bottom, GLdouble top,
78 GLdouble nearval, GLdouble farval );
79
80 extern void
81 _mesa_Ortho( GLdouble left, GLdouble right,
82 GLdouble bottom, GLdouble top,
83 GLdouble nearval, GLdouble farval );
84
85 extern void
86 _mesa_PushMatrix( void );
87
88 extern void
89 _mesa_PopMatrix( void );
90
91 extern void
92 _mesa_LoadIdentity( void );
93
94 extern void
95 _mesa_LoadMatrixf( const GLfloat *m );
96
97 extern void
98 _mesa_LoadMatrixd( const GLdouble *m );
99
100 extern void
101 _mesa_MatrixMode( GLenum mode );
102
103 extern void
104 _mesa_MultMatrixf( const GLfloat *m );
105
106 extern void
107 _mesa_MultMatrixd( const GLdouble *m );
108
109 extern void
110 _mesa_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z );
111
112 extern void
113 _mesa_Rotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z );
114
115 extern void
116 _mesa_Scalef( GLfloat x, GLfloat y, GLfloat z );
117
118 extern void
119 _mesa_Scaled( GLdouble x, GLdouble y, GLdouble z );
120
121 extern void
122 _mesa_Translatef( GLfloat x, GLfloat y, GLfloat z );
123
124 extern void
125 _mesa_Translated( GLdouble x, GLdouble y, GLdouble z );
126
127 extern void
128 _mesa_LoadTransposeMatrixfARB( const GLfloat *m );
129
130 extern void
131 _mesa_LoadTransposeMatrixdARB( const GLdouble *m );
132
133 extern void
134 _mesa_MultTransposeMatrixfARB( const GLfloat *m );
135
136 extern void
137 _mesa_MultTransposeMatrixdARB( const GLdouble *m );
138
139 extern void
140 _mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height );
141
142 extern void
143 gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
144
145 extern void
146 _mesa_DepthRange( GLclampd nearval, GLclampd farval );
147
148
149 #endif