Adding a method of rendering GUI's that avoid the whole throwing raw

data around everywhere thing I had going on before
This commit is contained in:
MitchellHansen
2017-09-27 23:36:20 -07:00
parent a6e18bbb54
commit 3ff6fb0b14
11 changed files with 343 additions and 59 deletions

View File

@@ -95,3 +95,20 @@ void LightHandle::update(double delta_time) {
}
void LightHandle::render_gui() {
ImGui::Begin("Lights");
// Well I'm noooot reaallly supposed to do this. But I've been doing with the caster for
// a wile with no problems....
ImGui::SliderFloat4("Color", reinterpret_cast<float*>(&data_reference->rgbi), 0, 1);
ImGui::SliderFloat3("Position", reinterpret_cast<float*>(&data_reference->position), 0, 256);
ImGui::Separator();
ImGui::End();
}
void LightHandle::update_gui() {
rendering = true;
}