removed all dependence on NodeOutputs
If Nodes only have the one output, we don't need to do so much differentiation between them. Previous iteration used outputs as like a distinct function within a Node (e.g. length output would return one result, buffer output would produce a different result - each run different code to produce their results). Now in this iteration, it's more accurate to say a Node is just one function (which seems more appropriate for a node system anyway).
This commit is contained in:
@@ -83,12 +83,12 @@ bool OpenGLBackend::TraverseCompiling(Node *n)
|
||||
{
|
||||
foreach (NodeParam* param, n->parameters()) {
|
||||
if (param->type() == NodeParam::kInput && param->IsConnected()) {
|
||||
NodeOutput* connected_output = static_cast<NodeInput*>(param)->get_connected_output();
|
||||
Node* connected_output = static_cast<NodeInput*>(param)->get_connected_node();
|
||||
|
||||
// Check if we have a shader or not
|
||||
if (shader_cache_.GetShader(connected_output) == nullptr) {
|
||||
// Since we don't have a shader, compile one now
|
||||
QString node_code = connected_output->parentNode()->Code(connected_output);
|
||||
QString node_code = connected_output->Code();
|
||||
|
||||
// If the node has no code, it mustn't be GPU accelerated
|
||||
if (!node_code.isEmpty()) {
|
||||
@@ -126,7 +126,7 @@ bool OpenGLBackend::TraverseCompiling(Node *n)
|
||||
}
|
||||
}
|
||||
|
||||
if (!TraverseCompiling(connected_output->parentNode())) {
|
||||
if (!TraverseCompiling(connected_output)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user