mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Backends: WebGPU: update code for latest webgpu-native changes. Fix for Emscripten. (#8426)
This commit is contained in:
parent
6aa0810de5
commit
9996a2d51b
1 changed files with 8 additions and 0 deletions
|
|
@ -569,12 +569,20 @@ static void ImGui_ImplWGPU_CreateFontsTexture()
|
|||
|
||||
// Upload texture data
|
||||
{
|
||||
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||
WGPUTexelCopyTextureInfo dst_view = {};
|
||||
#else
|
||||
WGPUImageCopyTexture dst_view = {};
|
||||
#endif
|
||||
dst_view.texture = bd->renderResources.FontTexture;
|
||||
dst_view.mipLevel = 0;
|
||||
dst_view.origin = { 0, 0, 0 };
|
||||
dst_view.aspect = WGPUTextureAspect_All;
|
||||
#if defined(IMGUI_IMPL_WEBGPU_BACKEND_DAWN) || defined(IMGUI_IMPL_WEBGPU_BACKEND_WGPU)
|
||||
WGPUTexelCopyBufferLayout layout = {};
|
||||
#else
|
||||
WGPUTextureDataLayout layout = {};
|
||||
#endif
|
||||
layout.offset = 0;
|
||||
layout.bytesPerRow = width * size_pp;
|
||||
layout.rowsPerImage = height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue