-/* $Id: matrix.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
+/* $Id: matrix.c,v 1.2 1999/09/05 19:59:33 keithw Exp $ */
/*
* Mesa 3-D graphics library
ctx->Viewport.WindowMap.m[MAT_TX] = ctx->Viewport.WindowMap.m[MAT_SX] + x;
ctx->Viewport.WindowMap.m[MAT_SY] = (GLfloat) height / 2.0F;
ctx->Viewport.WindowMap.m[MAT_TY] = ctx->Viewport.WindowMap.m[MAT_SY] + y;
+ ctx->Viewport.WindowMap.m[MAT_SZ] = 0.5 * DEPTH_SCALE;
+ ctx->Viewport.WindowMap.m[MAT_TZ] = 0.5 * DEPTH_SCALE;
+
+ ctx->Viewport.WindowMap.flags = MAT_FLAG_GENERAL_SCALE|MAT_FLAG_TRANSLATION;
+ ctx->Viewport.WindowMap.type = MATRIX_3D_NO_ROT;
ctx->ModelProjectWinMatrixUptodate = GL_FALSE;
ctx->NewState |= NEW_VIEWPORT;
}
}
+void gl_matrix_set_identity( GLmatrix *m )
+{
+ MEMCPY( m->m, Identity, sizeof(Identity));
+ m->type = MATRIX_IDENTITY;
+ m->flags = MAT_DIRTY_DEPENDENTS;
+}
+
+
void gl_matrix_alloc_inv( GLmatrix *m )
{
if (m->inv == 0) {