Added support for glLineStipple via osg::LineStipple state attribute.

This commit is contained in:
Robert Osfield
2002-02-24 20:55:45 +00:00
parent 4c4eae8073
commit f600f6fe4a
10 changed files with 184 additions and 1 deletions

33
src/osg/LineStipple.cpp Normal file
View File

@@ -0,0 +1,33 @@
#include <osg/GL>
#include <osg/LineStipple>
#include <osg/Notify>
using namespace osg;
LineStipple::LineStipple()
{
_factor = 1;
_pattern = 0xffff;
}
LineStipple::~LineStipple()
{
}
void LineStipple::setFactor(const int factor)
{
_factor = factor;
}
void LineStipple::setPattern(const unsigned short pattern)
{
_pattern = pattern;
}
void LineStipple::apply(State&) const
{
glLineStipple(_factor, _pattern);
}

View File

@@ -30,6 +30,7 @@ C++FILES = \
Light.cpp\
LightSource.cpp\
LineSegment.cpp\
LineStipple.cpp\
LineWidth.cpp\
LOD.cpp\
Material.cpp\
@@ -99,6 +100,7 @@ TARGET_INCLUDE_FILES = \
osg/Light\
osg/LightSource\
osg/LineSegment\
osg/LineStipple\
osg/LineWidth\
osg/Material\
osg/Math\