X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmath%2Fm_matrix.h;h=c34d9e3022f7e9044ec8fc46e027278beed00576;hb=0cb6537deecbbb5f330b5835de29f64e4faf61c4;hp=a8d9000e89be05b93918b21111dbef001f69c0df;hpb=c12d24b513a67648c30bf892964f887fad71e103;p=mesa.git diff --git a/src/mesa/math/m_matrix.h b/src/mesa/math/m_matrix.h index a8d9000e89b..c34d9e3022f 100644 --- a/src/mesa/math/m_matrix.h +++ b/src/mesa/math/m_matrix.h @@ -1,6 +1,5 @@ /* * Mesa 3-D graphics library - * Version: 6.3 * * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * @@ -17,9 +16,10 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ @@ -32,6 +32,13 @@ #define _M_MATRIX_H +#include "main/glheader.h" + + +#ifdef __cplusplus +extern "C" { +#endif + /** * \name Symbolic names to some of the entries in the matrix @@ -67,7 +74,7 @@ enum GLmatrixtype { */ typedef struct { GLfloat *m; /**< 16 matrix elements (16-byte aligned) */ - GLfloat *inv; /**< optional 16-element inverse (16-byte aligned) */ + GLfloat *inv; /**< 16-element inverse (16-byte aligned) */ GLuint flags; /**< possible values determined by (of \link * MatFlags MAT_FLAG_* flags\endlink) */ @@ -83,9 +90,6 @@ _math_matrix_ctr( GLmatrix *m ); extern void _math_matrix_dtr( GLmatrix *m ); -extern void -_math_matrix_alloc_inv( GLmatrix *m ); - extern void _math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ); @@ -118,8 +122,8 @@ _math_matrix_frustum( GLmatrix *mat, GLfloat nearval, GLfloat farval ); extern void -_math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, - GLfloat zNear, GLfloat zFar, GLfloat depthMax); +_math_matrix_viewport( GLmatrix *m, const float scale[3], + const float translate[3], double depthMax ); extern void _math_matrix_set_identity( GLmatrix *dest ); @@ -200,8 +204,15 @@ do { \ } while (0) +extern void +_mesa_transform_vector(GLfloat u[4], const GLfloat v[4], const GLfloat m[16]); + /*@}*/ +#ifdef __cplusplus +} +#endif + #endif