Changeset 13041 for OpenSceneGraph/trunk/src/osgSim/ImpostorSprite.cpp
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgSim/ImpostorSprite.cpp
r12391 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 83 83 84 84 float error_sqrd = dx*dx+dy*dy; 85 85 86 86 if (error_sqrd > max_error_sqrd) max_error_sqrd = error_sqrd; 87 87 88 88 } 89 89 … … 155 155 functor.setVertexArray(4,_coords); 156 156 functor.drawArrays( GL_QUADS, 0, 4); 157 157 158 158 } 159 159 … … 172 172 _alphafunc = new osg::AlphaFunc; 173 173 _alphafunc->setFunction( osg::AlphaFunc::GREATER, 0.000f ); 174 174 175 175 _reuseStateSetIndex = 0; 176 176 } … … 187 187 _first = next; 188 188 } 189 189 190 190 } 191 191 … … 254 254 { 255 255 256 // search for a valid impostor to reuse. 256 // search for a valid impostor to reuse. 257 257 ImpostorSprite* curr = _first; 258 258 while (curr) … … 274 274 275 275 // creating new impostor sprite. 276 276 277 277 278 278 osg::StateSet* stateset = new osg::StateSet; … … 311 311 312 312 push_back(is); 313 313 314 314 return is; 315 315
