Dear ImGui

This commit is contained in:
Ben
2021-09-18 17:30:57 +01:00
parent b221dedb6b
commit ad0e841e9b
24 changed files with 43635 additions and 4 deletions

View File

@@ -2,6 +2,8 @@
#include <iostream>
#include "Aeon/Rendering/ImGui.hpp"
using Aeon::Core::App;
using Aeon::Core::Display;
using Aeon::Core::DisplayProperties;
@@ -22,6 +24,22 @@ void App::Run()
while ( !mSIGTERM )
{
mInput.PollInput();
static float f = 0.0f;
static int counter = 0;
static ImVec4 clearColour = ImVec4( 0.45f, 0.55f, 0.60f, 1.00f );
ImGui::Begin( "Hello, world!" ); // Create a window called "Hello, world!" and append into it.
ImGui::Text( "This is some useful text." ); // Display some text (you can use a format strings too)
ImGui::SliderFloat( "float", &f, 0.0f, 1.0f ); // Edit 1 float using a slider from 0.0f to 1.0f
ImGui::ColorEdit3( "clear color", (float*)&clearColour ); // Edit 3 floats representing a color
ImGui::End();
mDisplay.SetClearColour( clearColour.x, clearColour.y, clearColour.z, clearColour.w );
mDisplay.EndFrame();
}
}