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. Amend. (#8426)
This commit is contained in:
parent
4f4fb1d220
commit
6aa0810de5
1 changed files with 2 additions and 2 deletions
|
|
@ -493,7 +493,7 @@ void ImGui_ImplWGPU_RenderDrawData(ImDrawData* draw_data, WGPURenderPassEncoder
|
||||||
{
|
{
|
||||||
// Bind custom texture
|
// Bind custom texture
|
||||||
ImTextureID tex_id = pcmd->GetTexID();
|
ImTextureID tex_id = pcmd->GetTexID();
|
||||||
ImGuiID tex_id_hash = ImHashData(&tex_id, sizeof(tex_id));
|
ImGuiID tex_id_hash = ImHashData(&tex_id, sizeof(tex_id), 0);
|
||||||
auto bind_group = bd->renderResources.ImageBindGroups.GetVoidPtr(tex_id_hash);
|
auto bind_group = bd->renderResources.ImageBindGroups.GetVoidPtr(tex_id_hash);
|
||||||
if (bind_group)
|
if (bind_group)
|
||||||
{
|
{
|
||||||
|
|
@ -755,7 +755,7 @@ bool ImGui_ImplWGPU_CreateDeviceObjects()
|
||||||
WGPUBindGroup image_bind_group = ImGui_ImplWGPU_CreateImageBindGroup(bg_layouts[1], bd->renderResources.FontTextureView);
|
WGPUBindGroup image_bind_group = ImGui_ImplWGPU_CreateImageBindGroup(bg_layouts[1], bd->renderResources.FontTextureView);
|
||||||
bd->renderResources.ImageBindGroup = image_bind_group;
|
bd->renderResources.ImageBindGroup = image_bind_group;
|
||||||
bd->renderResources.ImageBindGroupLayout = bg_layouts[1];
|
bd->renderResources.ImageBindGroupLayout = bg_layouts[1];
|
||||||
bd->renderResources.ImageBindGroups.SetVoidPtr(ImHashData(&bd->renderResources.FontTextureView, sizeof(ImTextureID)), image_bind_group);
|
bd->renderResources.ImageBindGroups.SetVoidPtr(ImHashData(&bd->renderResources.FontTextureView, sizeof(ImTextureID), 0), image_bind_group);
|
||||||
|
|
||||||
SafeRelease(vertex_shader_desc.module);
|
SafeRelease(vertex_shader_desc.module);
|
||||||
SafeRelease(pixel_shader_desc.module);
|
SafeRelease(pixel_shader_desc.module);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue