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
@@ -38,27 +38,27 @@ void ExternalTransition::Retranslate()
meta_.Retranslate();
}
bool ExternalTransition::IsAccelerated() const
Node::Capabilities ExternalTransition::GetCapabilities(const NodeValueDatabase &) const
{
return true;
return kShader;
}
QString ExternalTransition::AcceleratedCodeVertex() const
QString ExternalTransition::ShaderVertexCode(const NodeValueDatabase &) const
{
return meta_.vert_code();
}
QString ExternalTransition::AcceleratedCodeFragment() const
QString ExternalTransition::ShaderFragmentCode(const NodeValueDatabase&) const
{
return meta_.frag_code();
}
int ExternalTransition::AcceleratedCodeIterations() const
int ExternalTransition::ShaderIterations() const
{
return meta_.iterations();
}
NodeInput *ExternalTransition::AcceleratedCodeIterativeInput() const
NodeInput *ExternalTransition::ShaderIterativeInput() const
{
return meta_.iteration_input();
}