mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
math: drop MAT_[ST][XYZ] defines
These were used a single time each, and that argually made the code a bit more confusing to read. Let's just drop these, and use the correct indexes directly. Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24003>
This commit is contained in:
parent
4a00e4ff61
commit
d941078129
2 changed files with 6 additions and 20 deletions
|
|
@ -931,12 +931,12 @@ void
|
|||
_math_matrix_viewport(GLmatrix *m, const float scale[3],
|
||||
const float translate[3], double depthMax)
|
||||
{
|
||||
m->m[MAT_SX] = scale[0];
|
||||
m->m[MAT_TX] = translate[0];
|
||||
m->m[MAT_SY] = scale[1];
|
||||
m->m[MAT_TY] = translate[1];
|
||||
m->m[MAT_SZ] = depthMax*scale[2];
|
||||
m->m[MAT_TZ] = depthMax*translate[2];
|
||||
m->m[0] = scale[0];
|
||||
m->m[5] = scale[1];
|
||||
m->m[10] = depthMax*scale[2];
|
||||
m->m[12] = translate[0];
|
||||
m->m[13] = translate[1];
|
||||
m->m[14] = depthMax*translate[2];
|
||||
m->flags = MAT_FLAG_GENERAL_SCALE | MAT_FLAG_TRANSLATION;
|
||||
m->type = MATRIX_3D_NO_ROT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,20 +40,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \name Symbolic names to some of the entries in the matrix
|
||||
*
|
||||
* These are handy for the viewport mapping, which is expressed as a matrix.
|
||||
*/
|
||||
/*@{*/
|
||||
#define MAT_SX 0
|
||||
#define MAT_SY 5
|
||||
#define MAT_SZ 10
|
||||
#define MAT_TX 12
|
||||
#define MAT_TY 13
|
||||
#define MAT_TZ 14
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* Different kinds of 4x4 transformation matrices.
|
||||
* We use these to select specific optimized vertex transformation routines.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue