@@ -89,8 +89,8 @@ static void ImGui_ImplSDLGPU3_SetupRenderState(ImDrawData* draw_data, SDL_GPUGra
89
89
SDL_GPUBufferBinding index_buffer_binding = {};
90
90
index_buffer_binding.buffer = fd->IndexBuffer ;
91
91
index_buffer_binding.offset = 0 ;
92
- SDL_BindGPUVertexBuffers (render_pass,0 ,&vertex_buffer_binding,1 );
93
- SDL_BindGPUIndexBuffer (render_pass,&index_buffer_binding,sizeof (ImDrawIdx) == 2 ? SDL_GPU_INDEXELEMENTSIZE_16BIT : SDL_GPU_INDEXELEMENTSIZE_32BIT);
92
+ SDL_BindGPUVertexBuffers (render_pass,0 , &vertex_buffer_binding, 1 );
93
+ SDL_BindGPUIndexBuffer (render_pass, &index_buffer_binding, sizeof (ImDrawIdx) == 2 ? SDL_GPU_INDEXELEMENTSIZE_16BIT : SDL_GPU_INDEXELEMENTSIZE_32BIT);
94
94
}
95
95
96
96
// Setup viewport
@@ -101,7 +101,7 @@ static void ImGui_ImplSDLGPU3_SetupRenderState(ImDrawData* draw_data, SDL_GPUGra
101
101
viewport.h = (float )fb_height;
102
102
viewport.min_depth = 0 .0f ;
103
103
viewport.max_depth = 1 .0f ;
104
- SDL_SetGPUViewport (render_pass,&viewport);
104
+ SDL_SetGPUViewport (render_pass, &viewport);
105
105
106
106
// Setup scale and translation
107
107
// Our visible imgui space lies from draw_data->DisplayPps (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayPos is (0,0) for single viewport apps.
@@ -118,6 +118,7 @@ static void CreateOrResizeBuffer(SDL_GPUBuffer** buffer, uint32_t* old_size, uin
118
118
ImGui_ImplSDLGPU3_Data* bd = ImGui_ImplSDLGPU3_GetBackendData ();
119
119
ImGui_ImplSDLGPU3_InitInfo* v = &bd->InitInfo ;
120
120
121
+ // Even though this is fairly rarely called.
121
122
SDL_WaitForGPUIdle (v->Device );
122
123
SDL_ReleaseGPUBuffer (v->Device , *buffer);
123
124
@@ -196,8 +197,8 @@ void Imgui_ImplSDLGPU3_PrepareDrawData(ImDrawData* draw_data, SDL_GPUCommandBuff
196
197
index_buffer_region.size = index_size;
197
198
198
199
SDL_GPUCopyPass* copy_pass = SDL_BeginGPUCopyPass (command_buffer);
199
- SDL_UploadToGPUBuffer (copy_pass, &vertex_buffer_location, &vertex_buffer_region,true );
200
- SDL_UploadToGPUBuffer (copy_pass, &index_buffer_location, &index_buffer_region,true );
200
+ SDL_UploadToGPUBuffer (copy_pass, &vertex_buffer_location, &vertex_buffer_region, true );
201
+ SDL_UploadToGPUBuffer (copy_pass, &index_buffer_location, &index_buffer_region, true );
201
202
SDL_EndGPUCopyPass (copy_pass);
202
203
SDL_ReleaseGPUTransferBuffer (v->Device , index_transferbuffer);
203
204
SDL_ReleaseGPUTransferBuffer (v->Device , vertex_transferbuffer);
@@ -527,7 +528,7 @@ void ImGui_ImplSDLGPU3_CreateDeviceObjects()
527
528
sampler_info.mip_lod_bias = 0 .0f ;
528
529
sampler_info.min_lod = -1000 .0f ;
529
530
sampler_info.max_lod = 1000 .0f ;
530
- sampler_info.enable_anisotropy = true ;
531
+ sampler_info.enable_anisotropy = false ;
531
532
sampler_info.max_anisotropy = 1 .0f ;
532
533
sampler_info.enable_compare = false ;
533
534
0 commit comments