Also added imgui demo code.

This commit is contained in:
Relintai 2024-09-14 12:21:04 +02:00
parent c30ef4ce1e
commit 7c408a08bf
3 changed files with 10338 additions and 0 deletions

View File

@ -102,6 +102,7 @@ ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_gui/imgui_impl_glfw.cpp -o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_gui/imgui_impl_opengl3.cpp -o sfw/render_gui/imgui_impl_opengl3.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_gui/imgui_tables.cpp -o sfw/render_gui/imgui_tables.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_gui/imgui_widgets.cpp -o sfw/render_gui/imgui_widgets.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_gui/imgui_demo.cpp -o sfw/render_gui/imgui_demo.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/render_gui/gui.cpp -o sfw/render_gui/gui.o
ccache g++ -Wall -D_REENTRANT -g -Isfw -c sfw/game_scene.cpp -o sfw/game_scene.o
@ -150,6 +151,7 @@ ccache g++ -Wall -D_REENTRANT -g sfw/core/aabb.o sfw/core/basis.o sfw/core/color
sfw/render_gui/imgui_impl_opengl3.o \
sfw/render_gui/imgui_tables.o \
sfw/render_gui/imgui_widgets.o \
sfw/render_gui/imgui_demo.o \
sfw/render_gui/gui.o \
sfw/game_scene.o sfw/main.o \
-lX11 \

View File

@ -32,6 +32,11 @@ void GUI::test() {
static bool show_another_window = false;
static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
// 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
if (show_demo_window) {
ImGui::ShowDemoWindow(&show_demo_window);
}
// 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
{
static float f = 0.0f;

10331
sfw/render_gui/imgui_demo.cpp Normal file

File diff suppressed because it is too large Load Diff