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

@@ -30,6 +30,8 @@
#include "TexEnvCombine.h"
#include "TexGen.h"
#include "TexMat.h"
#include "FragmentProgram.h"
#include "VertexProgram.h"
#include "Group.h"
#include "MatrixTransform.h"
@@ -663,6 +665,14 @@ osg::StateAttribute* DataInputStream::readStateAttribute()
attribute = new osg::TexMat();
((ive::TexMat*)(attribute))->read(this);
}
else if(attributeID == IVEFRAGMENTPROGRAM){
attribute = new osg::FragmentProgram();
((ive::FragmentProgram*)(attribute))->read(this);
}
else if(attributeID == IVEVERTEXPROGRAM){
attribute = new osg::VertexProgram();
((ive::VertexProgram*)(attribute))->read(this);
}
else{
throw Exception("Unknown StateAttribute in StateSet::read()");
}