69 */ |
69 */ |
70 GLCompiler::GLCompiler (GLRenderer* renderer) : |
70 GLCompiler::GLCompiler (GLRenderer* renderer) : |
71 HierarchyElement (renderer), |
71 HierarchyElement (renderer), |
72 m_renderer (renderer) |
72 m_renderer (renderer) |
73 { |
73 { |
74 connect(renderer->model(), SIGNAL(objectAdded(LDObject*)), this, SLOT(compileObject(LDObject*))); |
74 connect(renderer->model(), SIGNAL(objectAdded(LDObject*, int)), this, SLOT(compileObject(LDObject*))); |
75 connect(renderer->model(), SIGNAL(objectModified(LDObject*)), this, SLOT(compileObject(LDObject*))); |
75 connect(renderer->model(), SIGNAL(objectModified(LDObject*)), this, SLOT(compileObject(LDObject*))); |
76 connect(renderer->model(), SIGNAL(aboutToRemoveObject(LDObject*)), this, SLOT(forgetObject(LDObject*)), Qt::DirectConnection); |
76 connect(renderer->model(), SIGNAL(aboutToRemoveObject(LDObject*, int)), this, SLOT(forgetObject(LDObject*)), Qt::DirectConnection); |
77 connect(renderer, SIGNAL(objectHighlightingChanged(LDObject*)), this, SLOT(compileObject(LDObject*))); |
77 connect(renderer, SIGNAL(objectHighlightingChanged(LDObject*)), this, SLOT(compileObject(LDObject*))); |
78 connect(m_window, SIGNAL(gridChanged()), this, SLOT(recompile())); |
78 connect(m_window, SIGNAL(gridChanged()), this, SLOT(recompile())); |
79 |
79 |
80 for (LDObject* object : renderer->model()->objects()) |
80 for (LDObject* object : renderer->model()->objects()) |
81 stageForCompilation(object); |
81 stageForCompilation(object); |