scene_rdl2: lib/scene/rdl2/SceneObject.{h,cc} need to allow binding of an attribute to a particular output on a shader object.
template <typename T> void setBinding(AttributeKey<T> key,
SceneObject* sceneObject, ShaderOutputKey<T> outKey);
void setBinding(const Attribute& attr, SceneObject* sceneObject, ShaderOutput& output);
void setBinding(const std::string& name, SceneObject* sceneObject, const std::string& outName);
template <typename T, typename U> SceneObject* SceneObject::getBinding(AttributeKey<T> key,
ShaderOutputKey<U>& outputKey) const;
SceneObject* SceneObject::getBinding(const Attribute& attr, ShaderOutput& output) const;
scene_rdl2: lib/scene/rdl2/SceneObject.{h,cc} need to allow binding of an attribute to a particular output on a shader object.
Some Implementation Thoughts
Should there still be a way to get the binding without accepting a name for backward compatibility?
If so, what should happen if an old getBinding is called on a binding which isn't the only output and isn't the default output (if there is a default)?
List of Possible Functions