fixes for the mga driver
This commit is contained in:
parent
324beb95f3
commit
9b7c843671
|
@ -1,4 +1,4 @@
|
|||
/* $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
|
||||
|
@ -1311,6 +1311,11 @@ void gl_Viewport( GLcontext *ctx,
|
|||
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;
|
||||
|
@ -1400,6 +1405,14 @@ void gl_matrix_dtr( GLmatrix *m )
|
|||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue