From 2f8ff58c0e8fbb60974be9c2412db8610b2152e2 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Mon, 3 Sep 2007 23:42:33 +0200 Subject: [PATCH] nouveau: nv10: forgot function to set modelview matrix --- src/mesa/drivers/dri/nouveau/nv10_state.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c index f9a83567724..93fc4ff9364 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state.c @@ -40,7 +40,6 @@ static void nv10ViewportScale(nouveauContextPtr nmesa) GLfloat w = ((GLfloat) ctx->Viewport.Width) * 0.5; GLfloat h = ((GLfloat) ctx->Viewport.Height) * 0.5; GLfloat max_depth = (ctx->Viewport.Near + ctx->Viewport.Far) * 0.5; - GLfloat projection[16]; int i; if (ctx->DrawBuffer) { @@ -780,6 +779,16 @@ static void nv10UpdateProjectionMatrix(GLcontext *ctx) OUT_RINGp(projection, 16); } +static void nv10UpdateModelviewMatrix(GLcontext *ctx) +{ + /* TODO update modelview if lighting or vertex weight enabled + update inverse modelview if lighting enabled + or update projection if lighting and vertex weight disabled + */ + + nv10UpdateProjectionMatrix(ctx); +} + /* Update anything that depends on the window position/size */ static void nv10WindowMoved(nouveauContextPtr nmesa) { @@ -1042,4 +1051,5 @@ void nv10InitStateFuncs(GLcontext *ctx, struct dd_function_table *func) nmesa->hw_func.BindBuffers = nv10BindBuffers; nmesa->hw_func.WindowMoved = nv10WindowMoved; nmesa->hw_func.UpdateProjectionMatrix = nv10UpdateProjectionMatrix; + nmesa->hw_func.UpdateModelviewMatrix = nv10UpdateModelviewMatrix; } -- 2.30.2