| 705 | } |
| 706 | |
| 707 | ShaderNode* ShaderGraph::createNode(const string& name, const string& uniqueId, ConstNodeDefPtr nodeDef, GenContext& context) |
| 708 | { |
| 709 | MX_TRACE_FUNCTION(Tracing::Category::ShaderGen); |
| 710 | MX_TRACE_SCOPE(Tracing::Category::ShaderGen, name.c_str()); |
| 711 | |
| 712 | if (!nodeDef) |
| 713 | { |
| 714 | throw ExceptionShaderGenError("Could not find a nodedef for node '" + name + "'"); |
| 715 | } |
| 716 | |
| 717 | // Create this node in the graph. |
| 718 | ShaderNodePtr newNode = ShaderNode::create(this, name, *nodeDef, context); |
| 719 | newNode->_uniqueId = uniqueId; |
| 720 | _nodeMap[uniqueId] = newNode; |
| 721 | _nodeOrder.push_back(newNode.get()); |
| 722 | |
| 723 | return newNode.get(); |
| 724 | } |
| 725 | |
| 726 | ShaderNode* ShaderGraph::createNode(ConstNodePtr node, GenContext& context) |
| 727 | { |
no test coverage detected