Fonts, Textures: main code for ImGuiBackendFlags_RendererHasTextures feature.

# Conflicts:
#	imgui.h
#	imgui_demo.cpp
This commit is contained in:
ocornut
2024-11-29 13:42:35 +01:00
committed by ocornut
parent 191a728ecc
commit 0f0473bf1c
8 changed files with 1750 additions and 802 deletions

View File

@@ -11,9 +11,10 @@ int main(int, char**)
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);
//unsigned char* tex_pixels = nullptr;
//int tex_w, tex_h;
//io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h);
io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures;
for (int n = 0; n < 20; n++)
{