Introduced new osg::PatchParameter StateAttribute class to wrap up glPatchParameter associated state.

Note, osg::Program::setParameter(GL_PATCH_VERTICES,num); is nolonger support and should be replaced by using the new PatchParameter class.
This commit is contained in:
Robert Osfield
2013-06-11 10:52:37 +00:00
parent 4623c251bb
commit 1a7f2fcb3e
8 changed files with 155 additions and 58 deletions

View File

@@ -0,0 +1,14 @@
#include <osg/PatchParameter>
#include <osgDB/ObjectWrapper>
#include <osgDB/InputStream>
#include <osgDB/OutputStream>
REGISTER_OBJECT_WRAPPER( PatchParameter,
new osg::PatchParameter,
osg::PatchParameter,
"osg::Object osg::StateAttribute osg::PatchParameter" )
{
ADD_INT_SERIALIZER( Vertices, 3);
ADD_VEC2_SERIALIZER( PatchDefaultInnerLevel, osg::Vec2(1.0f,1.0f));
ADD_VEC4_SERIALIZER( PatchDefaultOuterLevel, osg::Vec4(1.0f,1.0f,1.0f,1.0f));
}