- Timestamp:
- 11/17/05 21:22:55 (8 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgspotlight/osgspotlight.cpp
r4175 r4805 151 151 if (image) 152 152 { 153 osg::Texture2D* texture = new osg::Texture2D;154 texture->setImage(image);155 stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON);153 osg::Texture2D* texture = new osg::Texture2D; 154 texture->setImage(image); 155 stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); 156 156 } 157 157 … … 172 172 for(r=0;r<39;++r) 173 173 { 174 for(unsigned int c=0;c<38;++c)175 {174 for(unsigned int c=0;c<38;++c) 175 { 176 176 float h = vertex[r+c*39][2]; 177 177 if (h>maxHeight) maxHeight=h; … … 185 185 for(r=0;r<39;++r) 186 186 { 187 for(unsigned int c=0;c<38;++c)188 {187 for(unsigned int c=0;c<38;++c) 188 { 189 189 float h = vertex[r+c*39][2]; 190 grid->setHeight(c,r,(h+hieghtOffset)*hieghtScale);191 }190 grid->setHeight(c,r,(h+hieghtOffset)*hieghtScale); 191 } 192 192 } 193 193
