|
17 | 17 | // - Introduction, links and more at the top of imgui.cpp |
18 | 18 |
|
19 | 19 | // Important note to the reader who wish to integrate imgui_impl_sdlgpu3.cpp/.h in their own engine/app. |
20 | | -// - Unlike other backends, the user must call the function Imgui_ImplSDLGPU3_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU3_RenderDrawData. |
| 20 | +// - Unlike other backends, the user must call the function ImGui_ImplSDLGPU3_PrepareDrawData() BEFORE issuing a SDL_GPURenderPass containing ImGui_ImplSDLGPU3_RenderDrawData. |
21 | 21 | // Calling the function is MANDATORY, otherwise the ImGui will not upload neither the vertex nor the index buffer for the GPU. See imgui_impl_sdlgpu3.cpp for more info. |
22 | 22 |
|
23 | 23 | // CHANGELOG |
| 24 | +// 2025-03-21: Fixed typo in function name Imgui_ImplSDLGPU3_PrepareDrawData() -> ImGui_ImplSDLGPU3_PrepareDrawData(). |
24 | 25 | // 2025-01-16: Renamed ImGui_ImplSDLGPU3_InitInfo::GpuDevice to Device. |
25 | 26 | // 2025-01-09: SDL_GPU: Added the SDL_GPU3 backend. |
26 | 27 |
|
@@ -134,7 +135,7 @@ static void CreateOrResizeBuffer(SDL_GPUBuffer** buffer, uint32_t* old_size, uin |
134 | 135 | // SDL_GPU doesn't allow copy passes to occur while a render or compute pass is bound! |
135 | 136 | // The only way to allow a user to supply their own RenderPass (to render to a texture instead of the window for example), |
136 | 137 | // is to split the upload part of ImGui_ImplSDLGPU3_RenderDrawData() to another function that needs to be called by the user before rendering. |
137 | | -void Imgui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer) |
| 138 | +void ImGui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuffer* command_buffer) |
138 | 139 | { |
139 | 140 | // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates) |
140 | 141 | int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x); |
@@ -366,7 +367,7 @@ void ImGui_ImplSDLGPU3_DestroyFontsTexture() |
366 | 367 | io.Fonts->SetTexID(0); |
367 | 368 | } |
368 | 369 |
|
369 | | -static void Imgui_ImplSDLGPU3_CreateShaders() |
| 370 | +static void ImGui_ImplSDLGPU3_CreateShaders() |
370 | 371 | { |
371 | 372 | // Create the shader modules |
372 | 373 | ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData(); |
@@ -431,7 +432,7 @@ static void ImGui_ImplSDLGPU3_CreateGraphicsPipeline() |
431 | 432 | { |
432 | 433 | ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData(); |
433 | 434 | ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo; |
434 | | - Imgui_ImplSDLGPU3_CreateShaders(); |
| 435 | + ImGui_ImplSDLGPU3_CreateShaders(); |
435 | 436 |
|
436 | 437 | SDL_GPUVertexBufferDescription vertex_buffer_desc[1]; |
437 | 438 | vertex_buffer_desc[0].slot = 0; |
|
0 commit comments