Added support for glLineStipple via osg::LineStipple state attribute.
This commit is contained in:
33
src/osg/LineStipple.cpp
Normal file
33
src/osg/LineStipple.cpp
Normal 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);
|
||||
}
|
||||
|
||||
@@ -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\
|
||||
|
||||
Reference in New Issue
Block a user