nodes: made changes to the node system to allow for context sensitive shader code

Primarily implemented for the math node so a new shader can be generated and
compiled based on what inputs the node is receiving.
This commit is contained in:
itsmattkc
2020-03-29 03:11:30 +11:00
parent 52acb272bf
commit 7100d00060
20 changed files with 209 additions and 56 deletions
+6 -6
View File
@@ -40,27 +40,27 @@ void ExternalNode::Retranslate()
meta_.Retranslate();
}
bool ExternalNode::IsAccelerated() const
Node::Capabilities ExternalNode::GetCapabilities(const NodeValueDatabase &) const
{
return true;
return kShader;
}
QString ExternalNode::AcceleratedCodeVertex() const
QString ExternalNode::ShaderVertexCode(const NodeValueDatabase&) const
{
return meta_.vert_code();
}
QString ExternalNode::AcceleratedCodeFragment() const
QString ExternalNode::ShaderFragmentCode(const NodeValueDatabase&) const
{
return meta_.frag_code();
}
int ExternalNode::AcceleratedCodeIterations() const
int ExternalNode::ShaderIterations() const
{
return meta_.iterations();
}
NodeInput *ExternalNode::AcceleratedCodeIterativeInput() const
NodeInput *ExternalNode::ShaderIterativeInput() const
{
return meta_.iteration_input();
}