From Bob Kuehne, added support for FragmentProgram and VertexProgram into .ive
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
#include "TexEnvCombine.h"
|
||||
#include "TexGen.h"
|
||||
#include "TexMat.h"
|
||||
#include "FragmentProgram.h"
|
||||
#include "VertexProgram.h"
|
||||
|
||||
#include "Group.h"
|
||||
#include "MatrixTransform.h"
|
||||
@@ -466,6 +468,14 @@ void DataOutputStream::writeStateAttribute(const osg::StateAttribute* attribute)
|
||||
else if(dynamic_cast<const osg::TexMat*>(attribute)){
|
||||
((ive::TexMat*)(attribute))->write(this);
|
||||
}
|
||||
// This is a FragmentProgram
|
||||
else if(dynamic_cast<const osg::FragmentProgram*>(attribute)){
|
||||
((ive::FragmentProgram*)(attribute))->write(this);
|
||||
}
|
||||
// This is a VertexProgram
|
||||
else if(dynamic_cast<const osg::VertexProgram*>(attribute)){
|
||||
((ive::VertexProgram*)(attribute))->write(this);
|
||||
}
|
||||
else{
|
||||
std::string className = attribute->className();
|
||||
throw Exception(std::string("StateSet::write(): Unknown StateAttribute: ").append(className));
|
||||
|
||||
Reference in New Issue
Block a user