removing lights by pointer

This commit is contained in:
devZoGok
2024-09-08 20:33:13 +03:00
parent 93e479662f
commit 059136a688
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -253,6 +253,18 @@ namespace vb01{
}
void Node::removeLight(Light *light){
for(int i = 0; i < lights.size(); i++)
if(lights[i] == light){
lights.erase(lights.begin() + i);
Root::getSingleton()->shiftNumLights(false);
updateShaders();
break;
}
}
void Node::removeLight(int id){
Root::getSingleton()->shiftNumLights(false);
Light *light = lights[id];