Updated Image Loading and Displaying Examples (markdown)

omar 2024-10-09 16:16:13 +02:00
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();
```
![image](https://github.com/user-attachments/assets/e353d1a0-b8bc-423d-92bd-cc739c058dde)
![image](https://github.com/user-attachments/assets/4d5f4c13-5cbe-4516-bc9e-3005be2fba4b)
##### [Return to Index](#index)