Bugfix - init all children when init group

This commit is contained in:
brunoherbelin
2020-04-05 10:25:29 +02:00
parent bef60e3e13
commit c23586df27
2 changed files with 6 additions and 3 deletions

View File

@@ -81,9 +81,7 @@ void ImGuiVisitor::visit(Primitive &n)
ImGui::PushID(n.id());
ImGui::Text("Primitive");
if (n.getShader())
n.getShader()->accept(*this);
n.getShader()->accept(*this);
ImGui::PopID();
}

View File

@@ -172,6 +172,11 @@ Group::~Group()
void Group::init()
{
for (std::vector<Node*>::iterator node = children_.begin();
node != children_.end(); node++) {
(*node)->init();
}
visible_ = true;
initialized_ = true;
}