Archived
1
Fork 0

Improve debug light interface

This commit is contained in:
Joshua Goins 2022-02-07 15:52:21 -05:00
parent 8816d64e42
commit c732a86df8

View file

@ -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");