From c30141d6bea4cebaf1d3697f85925fc8bc1c1a5a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 18 Mar 2005 09:37:46 +0000 Subject: [PATCH] From Mike Weiblen, "minor patches to osgFX consisting of changing from "state.matrix.modelview[0]" to the equivalent "state.matrix.modelview". Per ARB_vertex_program, the "[0]" syntax is supported only when EXT_vertex_weighting or ARB_vertex_blend are supported." --- src/osgFX/AnisotropicLighting.cpp | 2 +- src/osgFX/BumpMapping.cpp | 6 +++--- src/osgFX/Cartoon.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osgFX/AnisotropicLighting.cpp b/src/osgFX/AnisotropicLighting.cpp index 99f3cbaae..2c55643f1 100644 --- a/src/osgFX/AnisotropicLighting.cpp +++ b/src/osgFX/AnisotropicLighting.cpp @@ -144,7 +144,7 @@ namespace "ATTRIB v16 = vertex.position;" "PARAM s259[4] = { state.matrix.mvp };" "PARAM s18 = state.light[" << lightnum_ << "].position;" - "PARAM s223[4] = { state.matrix.modelview[0] };" + "PARAM s223[4] = { state.matrix.modelview };" "PARAM c0[4] = { program.local[0..3] };" " DP4 result.position.x, s259[0], v16;" " DP4 result.position.y, s259[1], v16;" diff --git a/src/osgFX/BumpMapping.cpp b/src/osgFX/BumpMapping.cpp index 2e7b94c3e..98654c874 100644 --- a/src/osgFX/BumpMapping.cpp +++ b/src/osgFX/BumpMapping.cpp @@ -256,7 +256,7 @@ namespace "PARAM s77 = state.lightprod[0].specular;" "PARAM s4 = state.material.shininess;" "PARAM s75 = state.lightprod[0].ambient;" - "PARAM s223[4] = { state.matrix.modelview[0] };" + "PARAM s223[4] = { state.matrix.modelview };" "PARAM c0[4] = { program.local[0..3] };" " MOV result.texcoord[" << freeunit << "].xyz, s75.xyzx;" " MOV result.texcoord[" << freeunit << "].w, s4.x;" @@ -454,7 +454,7 @@ namespace "ATTRIB v16 = vertex.position;" "PARAM s259[4] = { state.matrix.mvp };" "PARAM s18 = state.light[" << lightnum_ << "].position;" - "PARAM s223[4] = { state.matrix.modelview[0] };" + "PARAM s223[4] = { state.matrix.modelview };" " MOV result.texcoord[" << diffuseunit_ << "].xy, v25;" " MOV result.texcoord[" << normalunit_ << "].xy, v24;" " DP3 R0.y, s223[0].xyzx, v3.xyzx;" @@ -517,7 +517,7 @@ namespace "ATTRIB v16 = vertex.position;" "PARAM s259[4] = { state.matrix.mvp };" "PARAM s18 = state.light[" << lightnum_ << "].position;" - "PARAM s631[4] = { state.matrix.modelview[0].invtrans };" + "PARAM s631[4] = { state.matrix.modelview.invtrans };" " DP4 R0.x, s631[0], v18;" " DP4 R0.y, s631[1], v18;" " DP4 R0.z, s631[2], v18;" diff --git a/src/osgFX/Cartoon.cpp b/src/osgFX/Cartoon.cpp index ede5eccb2..b79262e3a 100644 --- a/src/osgFX/Cartoon.cpp +++ b/src/osgFX/Cartoon.cpp @@ -72,7 +72,7 @@ namespace "PARAM s18 = state.light[" << lightnum_ << "].position;" "PARAM s16 = state.light[" << lightnum_ << "].diffuse;" "PARAM s1 = state.material.diffuse;" - "PARAM s631[4] = { state.matrix.modelview[0].invtrans };" + "PARAM s631[4] = { state.matrix.modelview.invtrans };" "MOV R0, s1;" "MUL result.color.front.primary, R0, s16;" "DP4 R0.x, s18, s18;"