renderer: moved all shader code into one solidified function
Makes texture-based optimizations easier when they're all in one place.
This commit is contained in:
@@ -126,12 +126,12 @@ void NodeInputArray::InsertAt(int index)
|
||||
NodeInput* this_param = sub_params_.at(i);
|
||||
NodeInput* prev_param = sub_params_.at(i-1);
|
||||
|
||||
if (this_param->IsConnected()) {
|
||||
if (this_param->is_connected()) {
|
||||
// Disconnect whatever is at this parameter (presumably its connection has already been copied so we can just remove it)
|
||||
NodeParam::DisconnectEdge(this_param->edges().first());
|
||||
}
|
||||
|
||||
if (prev_param->IsConnected()) {
|
||||
if (prev_param->is_connected()) {
|
||||
// Get edge here (only one since it's an input)
|
||||
NodeEdgePtr edge = prev_param->edges().first();
|
||||
|
||||
@@ -161,14 +161,14 @@ void NodeInputArray::RemoveAt(int index)
|
||||
for (int i=index;i<sub_params_.size();i++) {
|
||||
NodeInput* this_param = sub_params_.at(i);
|
||||
|
||||
if (this_param->IsConnected()) {
|
||||
if (this_param->is_connected()) {
|
||||
// Disconnect current edge
|
||||
NodeParam::DisconnectEdge(this_param->edges().first());
|
||||
}
|
||||
|
||||
if (i < sub_params_.size() - 1) {
|
||||
NodeInput* next_param = sub_params_.at(i + 1);
|
||||
if (next_param->IsConnected()) {
|
||||
if (next_param->is_connected()) {
|
||||
// Get edge from next param
|
||||
NodeEdgePtr edge = next_param->edges().first();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user