summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2007-09-03 23:42:33 +0200
committerPatrice Mandin <[email protected]>2007-09-03 23:42:33 +0200
commit2f8ff58c0e8fbb60974be9c2412db8610b2152e2 (patch)
tree6d9226b99471d3d2781e9b7093462cd25dd6555d /src
parentc45bb05b3c0b65981b6ddeaf1bb043b9a6f7f3fc (diff)
nouveau: nv10: forgot function to set modelview matrix
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state.c12
1 files changed, 11 insertions, 1 deletions
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;
}