1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

(Breaking) added ImTextureRef struct. Changed ImDrawCmd::TextureId to TexRef.

Softly breaking. May require support from language binding generator.
Rebased and reworked completely on 2025/03/19.
This commit is contained in:
ocornut 2025-03-17 19:13:17 +01:00
parent b2f39318cb
commit 191a728ecc
7 changed files with 126 additions and 92 deletions

View file

@ -1778,7 +1778,7 @@ static void DemoWindowWidgetsImages()
// - Consider using the lower-level ImDrawList::AddImage() API, via ImGui::GetWindowDrawList()->AddImage().
// - Read https://github.com/ocornut/imgui/blob/master/docs/FAQ.md
// - Read https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
ImTextureID my_tex_id = io.Fonts->TexID;
ImTextureRef my_tex_id = io.Fonts->TexID;
float my_tex_w = (float)io.Fonts->TexWidth;
float my_tex_h = (float)io.Fonts->TexHeight;
{