Further work on GLSL support in .ive
This commit is contained in:
@@ -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());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user