nodes: minor overhaul to functionality
The nodes now have more control over how their accelerated shaders/sample functions are run, as well as how items are popped off the value tables. This allows for various optimizations that we didn't have access to before.
This commit is contained in:
@@ -63,14 +63,21 @@ void SolidGenerator::Retranslate()
|
||||
color_input_->set_name(tr("Color"));
|
||||
}
|
||||
|
||||
Node::Capabilities SolidGenerator::GetCapabilities(const NodeValueDatabase &) const
|
||||
NodeValueTable SolidGenerator::Value(NodeValueDatabase &value) const
|
||||
{
|
||||
return kShader;
|
||||
ShaderJob job;
|
||||
job.InsertValue(color_input_, value);
|
||||
|
||||
NodeValueTable table = value.Merge();
|
||||
table.Push(NodeParam::kShaderJob, QVariant::fromValue(job), this);
|
||||
return table;
|
||||
}
|
||||
|
||||
QString SolidGenerator::ShaderFragmentCode(const NodeValueDatabase &) const
|
||||
ShaderCode SolidGenerator::GetShaderCode(const QByteArray &shader_id) const
|
||||
{
|
||||
return ReadFileAsString(":/shaders/solid.frag");
|
||||
Q_UNUSED(shader_id)
|
||||
|
||||
return ShaderCode(ReadFileAsString(":/shaders/solid.frag"), QString());
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
Reference in New Issue
Block a user