Add not-completely-useless output() method to ShaderAttrib

This commit is contained in:
rdb 2015-11-28 17:53:35 +01:00
parent 1628238222
commit eca343c712
2 changed files with 23 additions and 0 deletions

View File

@ -525,6 +525,28 @@ get_shader() const {
return _shader;
}
////////////////////////////////////////////////////////////////////
// Function: ShaderAttrib::output
// Access: Public, Virtual
// Description:
////////////////////////////////////////////////////////////////////
void ShaderAttrib::
output(ostream &out) const {
out << "ShaderAttrib:";
if (_has_shader) {
if (_shader == NULL) {
out << "off";
} else {
out << _shader->get_filename().get_basename();
}
} else if (_auto_shader) {
out << "auto";
}
out << "," << _inputs.size() << " inputs";
}
////////////////////////////////////////////////////////////////////
// Function: ShaderAttrib::compare_to_impl
// Access: Protected, Virtual

View File

@ -115,6 +115,7 @@ PUBLISHED:
static void register_with_read_factory();
public:
virtual void output(ostream &out) const;
protected:
virtual int compare_to_impl(const RenderAttrib *other) const;