Improve debug light interface
This commit is contained in:
parent
8816d64e42
commit
c732a86df8
1 changed files with 11 additions and 2 deletions
|
@ -60,9 +60,18 @@ void draw_lighting() {
|
|||
ImGui::Separator();
|
||||
|
||||
for(auto& [obj, light] : lights) {
|
||||
ImGui::PushID(obj);
|
||||
|
||||
ImGui::TextDisabled("%s", engine->get_scene()->get(obj).name.c_str());
|
||||
|
||||
auto& transform = engine->get_scene()->get<Transform>(obj);
|
||||
ImGui::DragFloat3((engine->get_scene()->get(obj).name + "Position").c_str(), transform.position.ptr());
|
||||
ImGui::DragFloat((engine->get_scene()->get(obj).name + "Light Size").c_str(), &light.size, 0.1f);
|
||||
ImGui::DragFloat3("Position", transform.position.ptr());
|
||||
ImGui::DragFloat("Light Size", &light.size, 0.1f);
|
||||
ImGui::Checkbox("Shadows enable", &light.enable_shadows);
|
||||
|
||||
ImGui::PopID();
|
||||
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
ImGui::Text("Environment");
|
||||
|
|
Reference in a new issue