From a6501b5d7ad204c3b998c843c7ed68ef7be323ba Mon Sep 17 00:00:00 2001 From: gramanas Date: Wed, 5 Jun 2024 19:04:25 +0300 Subject: more vks, stupid mutlistep build, and imgui --- .../examples/example_null/build_win32.bat | 3 ++ lib/imgui-1.90.7/examples/example_null/main.cpp | 37 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 lib/imgui-1.90.7/examples/example_null/build_win32.bat create mode 100644 lib/imgui-1.90.7/examples/example_null/main.cpp (limited to 'lib/imgui-1.90.7/examples/example_null') diff --git a/lib/imgui-1.90.7/examples/example_null/build_win32.bat b/lib/imgui-1.90.7/examples/example_null/build_win32.bat new file mode 100644 index 0000000..be81d80 --- /dev/null +++ b/lib/imgui-1.90.7/examples/example_null/build_win32.bat @@ -0,0 +1,3 @@ +@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler. +mkdir Debug +cl /nologo /Zi /MD /utf-8 /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib imm32.lib diff --git a/lib/imgui-1.90.7/examples/example_null/main.cpp b/lib/imgui-1.90.7/examples/example_null/main.cpp new file mode 100644 index 0000000..f7153cc --- /dev/null +++ b/lib/imgui-1.90.7/examples/example_null/main.cpp @@ -0,0 +1,37 @@ +// dear imgui: "null" example application +// (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT) +// This is useful to test building, but you cannot interact with anything here! +#include "imgui.h" +#include + +int main(int, char**) +{ + IMGUI_CHECKVERSION(); + ImGui::CreateContext(); + ImGuiIO& io = ImGui::GetIO(); + + // Build atlas + unsigned char* tex_pixels = nullptr; + int tex_w, tex_h; + io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h); + + for (int n = 0; n < 20; n++) + { + printf("NewFrame() %d\n", n); + io.DisplaySize = ImVec2(1920, 1080); + io.DeltaTime = 1.0f / 60.0f; + ImGui::NewFrame(); + + static float f = 0.0f; + ImGui::Text("Hello, world!"); + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::ShowDemoWindow(nullptr); + + ImGui::Render(); + } + + printf("DestroyContext()\n"); + ImGui::DestroyContext(); + return 0; +} -- cgit v1.2.3