Skip to content

Commit

Permalink
Use WGPUMipmapFilterMode enum when available
Browse files Browse the repository at this point in the history
  • Loading branch information
eliemichel authored and ocornut committed Apr 11, 2023
1 parent 1434036 commit fd944ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backends/imgui_impl_wgpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,11 @@ static void ImGui_ImplWGPU_CreateFontsTexture()
WGPUSamplerDescriptor sampler_desc = {};
sampler_desc.minFilter = WGPUFilterMode_Linear;
sampler_desc.magFilter = WGPUFilterMode_Linear;
#if defined(WEBGPU_BACKEND_WGPU)
sampler_desc.mipmapFilter = WGPUMipmapFilterMode_Linear;
#else
sampler_desc.mipmapFilter = WGPUFilterMode_Linear;
#endif
sampler_desc.addressModeU = WGPUAddressMode_Repeat;
sampler_desc.addressModeV = WGPUAddressMode_Repeat;
sampler_desc.addressModeW = WGPUAddressMode_Repeat;
Expand Down

0 comments on commit fd944ec

Please sign in to comment.