Drawable Renderer (#1570), Constant binder values weren't being converted before being used

This commit is contained in:
Tim Sylvester
2023-05-22 15:07:37 -07:00
committed by Bart Louwers
parent 7d964a3236
commit 353d96b5bf

View File

@@ -167,11 +167,18 @@ public:
return std::tuple<T>{currentValue.constantOr(constant)};
}
using BaseAttributeType = A;
using BaseVertex = gfx::VertexType<BaseAttributeType>;
std::size_t getVertexCount() const override { return 1; }
const /*std::tuple<ExpandToType<A, T>>&*/ void* getVertexValue(std::size_t) const override { return &constant; }
const /*std::tuple<ExpandToType<A, T>>&*/ void* getVertexValue(std::size_t) const override {
convertedValue = BaseVertex{attributeValue(constant)};
return &convertedValue;
}
private:
T constant;
mutable BaseVertex convertedValue;
};
template <class T, class... As>