Further work on GLSL support in .ive

This commit is contained in:
Robert Osfield
2005-05-11 11:42:09 +00:00
parent fb34b22e34
commit 8d31e75364
8 changed files with 121 additions and 7 deletions

View File

@@ -30,6 +30,10 @@ void Shader::write(DataOutputStream* out){
else
throw Exception("Shader::write(): Could not cast this osg::Shader to an osg::Object.");
out->writeString(getName());
out->writeInt(getType());
out->writeString(getShaderSource());
}
void Shader::read(DataInputStream* in)
@@ -54,4 +58,9 @@ void Shader::read(DataInputStream* in)
{
throw Exception("Shader::read(): Expected Shader identification.");
}
setName(in->readString());
setType(static_cast<Type>(in->readInt()));
setShaderSource(in->readString());
}