diff --git a/panda/src/pgraph/shaderAttrib.cxx b/panda/src/pgraph/shaderAttrib.cxx index 21145802d6..29e78e9dd1 100644 --- a/panda/src/pgraph/shaderAttrib.cxx +++ b/panda/src/pgraph/shaderAttrib.cxx @@ -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 diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index 5e92b71011..82f0be657a 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -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;