Changeset 13041 for OpenSceneGraph/trunk/src/osgSim/LightPointDrawable.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgSim/LightPointDrawable.cpp
r12390 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 */ … … 26 26 27 27 setSupportsDisplayList(false); 28 28 29 29 _depthOff = new osg::Depth; 30 30 _depthOff->setWriteMask(false); … … 35 35 _blendOne = new osg::BlendFunc; 36 36 _blendOne->setFunction(osg::BlendFunc::SRC_ALPHA,osg::BlendFunc::ONE); 37 37 38 38 _blendOneMinusSrcAlpha = new osg::BlendFunc; 39 39 _blendOneMinusSrcAlpha->setFunction(osg::BlendFunc::SRC_ALPHA,osg::BlendFunc::ONE_MINUS_SRC_ALPHA); … … 65 65 itr->erase(itr->begin(),itr->end()); 66 66 } 67 67 68 68 for(itr=_sizedAdditiveLightPointList.begin(); 69 69 itr!=_sizedAdditiveLightPointList.end(); … … 94 94 state.applyTextureMode(0,GL_TEXTURE_1D,false); 95 95 state.applyTextureMode(0,GL_TEXTURE_2D,false); 96 96 97 97 glHint(GL_POINT_SMOOTH_HINT,GL_NICEST); 98 98 … … 141 141 142 142 143 state.applyAttribute(_blendOne.get()); 143 state.applyAttribute(_blendOne.get()); 144 144 145 145 for(pointsize=1,sitr=_sizedAdditiveLightPointList.begin(); … … 160 160 161 161 glPointSize(1); 162 162 163 163 glHint(GL_POINT_SMOOTH_HINT,GL_FASTEST); 164 164 165 165 state.haveAppliedAttribute(osg::StateAttribute::POINT); 166 166 167 167 state.dirtyAllVertexArrays(); 168 168 state.disableAllVertexArrays(); 169 169 170 170 // restore the state afterwards. 171 171 state.apply();
