From Bob Kuehne, added support for FragmentProgram and VertexProgram into .ive

This commit is contained in:
Robert Osfield
2004-03-04 14:33:01 +00:00
parent 8540414ae0
commit feb36860b6
11 changed files with 208 additions and 1 deletions

View File

@@ -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));