| | 114 | void Document::setSubSurfacePolygonOffset(int level, osg::PolygonOffset* po) |
| | 115 | { |
| | 116 | _subsurfacePolygonOffsets[level] = po; |
| | 117 | } |
| | 118 | |
| | 119 | osg::PolygonOffset* Document::getSubSurfacePolygonOffset(int level) |
| | 120 | { |
| | 121 | osg::notify(osg::DEBUG_INFO)<<"Document::getSubSurfacePolygonOffset("<<level<<")"<<std::endl; |
| | 122 | osg::ref_ptr<osg::PolygonOffset>& po = _subsurfacePolygonOffsets[level]; |
| | 123 | if (!po) |
| | 124 | { |
| | 125 | po = new osg::PolygonOffset(-1.0f*float(level), -1.0f); |
| | 126 | } |
| | 127 | return po.get(); |
| | 128 | } |
| | 129 | |