mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
Updated Image Loading and Displaying Examples (markdown)
parent
9cf438a9e3
commit
d5896944f4
@ -669,14 +669,14 @@ IM_ASSERT(ret);
|
||||
|
||||
Now that we have a SDL_Texture and its dimensions, we can display it in our main loop:
|
||||
```cpp
|
||||
ImGui::Begin("SDL2/SDL_Renderer Texture Test");
|
||||
ImGui::Begin("SDL_Renderer Texture Test");
|
||||
ImGui::Text("pointer = %p", my_texture);
|
||||
ImGui::Text("size = %d x %d", my_image_width, my_image_height);
|
||||
ImGui::Image((ImTextureID)(intptr_t)my_texture, ImVec2((float)my_image_width, (float)my_image_height));
|
||||
ImGui::End();
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
##### [Return to Index](#index)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user