Added support for glLineWidth via an osg::LineWidth StateAttribute.
This commit is contained in:
27
src/osg/LineWidth.cpp
Normal file
27
src/osg/LineWidth.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <osg/GL>
|
||||
#include <osg/LineWidth>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
|
||||
LineWidth::LineWidth()
|
||||
{
|
||||
_width = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
LineWidth::~LineWidth()
|
||||
{
|
||||
}
|
||||
|
||||
void LineWidth::setWidth( const float width )
|
||||
{
|
||||
_width = width;
|
||||
}
|
||||
|
||||
void LineWidth::apply(State&) const
|
||||
{
|
||||
glLineWidth(_width);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user