From 7c7f195d6e39498fda20bf5406b97b17d049aa39 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 7 Feb 2002 01:12:06 +0000 Subject: [PATCH] Fix for the handling of lighting in the DW loader. --- src/osgPlugins/dw/ReaderWriterDW.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/dw/ReaderWriterDW.cpp b/src/osgPlugins/dw/ReaderWriterDW.cpp index f949f2493..80ce2dc43 100644 --- a/src/osgPlugins/dw/ReaderWriterDW.cpp +++ b/src/osgPlugins/dw/ReaderWriterDW.cpp @@ -44,7 +44,7 @@ public: opacity=1; specular=0; specexp=0; fname="";TextureWidth=1; TextureHeight=1; ctx=NULL; tx=NULL; id=0; dstate=NULL;colour[0]=colour[1]=colour[2]=colour[3]=1; bright=halfIn=halfOut=falloff=0;atyp=NONE; - _lightnum=0; + _lightnum=1; } ~dwmaterial() { } void settexture() { @@ -503,13 +503,14 @@ public: gset->setCoords( verts, nusidx ); if (themat->isType(dwmaterial::PointLight) || themat->isType(dwmaterial::SpotLight)) { Vec4 pos; - pos.set(0,0,0,1); + pos.set(0.0f,0.0f,0.0f,0.0f); for (int i=0; imakeLight(pos); grp->addChild(ls); } else {