MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / main

Function main

lib/imgui/examples/example_null/main.cpp:7–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <stdio.h>
6
7int main(int, char**)
8{
9 IMGUI_CHECKVERSION();
10 ImGui::CreateContext();
11 ImGuiIO& io = ImGui::GetIO();
12
13 // Build atlas
14 unsigned char* tex_pixels = NULL;
15 int tex_w, tex_h;
16 io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h);
17
18 for (int n = 0; n < 20; n++)
19 {
20 printf("NewFrame() %d\n", n);
21 io.DisplaySize = ImVec2(1920, 1080);
22 io.DeltaTime = 1.0f / 60.0f;
23 ImGui::NewFrame();
24
25 static float f = 0.0f;
26 ImGui::Text("Hello, world!");
27 ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
28 ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
29 ImGui::ShowDemoWindow(NULL);
30
31 ImGui::Render();
32 }
33
34 printf("DestroyContext()\n");
35 ImGui::DestroyContext();
36 return 0;
37}

Callers

nothing calls this directly

Calls 5

CreateContextFunction · 0.85
ImVec2Class · 0.85
DestroyContextFunction · 0.85
GetTexDataAsRGBA32Method · 0.80
RenderFunction · 0.50

Tested by

no test coverage detected