Patch Update - Light dans ImGui

Feat :

+ Fenêtre Light dans l'interface
+ Contrôle des lights (position, couleur)
This commit is contained in:
2024-04-08 14:28:27 +02:00
parent 064c34b6dc
commit 8d344dbfc7
5 changed files with 32 additions and 11 deletions

View File

@@ -1448,4 +1448,19 @@ void ApplicationClass::SetLightPosition(int index, XMVECTOR position)
//set the position
m_Lights[index]->SetPosition(lightPosition.x, lightPosition.y, lightPosition.z);
}
}
void ApplicationClass::DeleteLight(int index)
{
if (index < 0 || index >= m_Lights.size())
{
// Index out of bounds
return;
}
// Delete the light object
delete m_Lights[index];
// Remove the light from the vector
m_Lights.erase(m_Lights.begin() + index);
}