From Mike Weiblen, updates to GL Shadler Language support

This commit is contained in:
Robert Osfield
2005-04-08 13:10:44 +00:00
parent dd3db860a2
commit d31cd3dce6
4 changed files with 24 additions and 14 deletions

View File

@@ -31,7 +31,7 @@ bool Shader_readLocalData(Object& obj, Input& fr)
Shader& shader = static_cast<Shader&>(obj);
if (fr.matchSequence("type %s"))
if (fr.matchSequence("type %w"))
{
shader.setType( Shader::getTypeId(fr[1].getStr()) );
fr+=2;

View File

@@ -29,7 +29,7 @@ bool Uniform_readLocalData(Object& obj, Input& fr)
Uniform& uniform = static_cast<Uniform&>(obj);
if (fr.matchSequence("type %s"))
if (fr.matchSequence("type %w"))
{
uniform.setType( Uniform::getTypeId(fr[1].getStr()) );
fr+=2;
@@ -53,9 +53,9 @@ bool Uniform_writeLocalData(const Object& obj,Output& fw)
{
const Uniform& uniform = static_cast<const Uniform&>(obj);
fw.indent() << "type " << uniform.getTypename( uniform.getType() ) << std::endl;
fw.indent() << "type " << Uniform::getTypename( uniform.getType() ) << std::endl;
fw.indent() << "name "<< uniform.getName() << std::endl;
fw.indent() << "name "<< fw.wrapString(uniform.getName()) << std::endl;
// TODO write uniform value based on type