From e4939e6abfda241e094f5a79624b95ec285b44a5 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 23 Apr 2026 20:27:04 +0200 Subject: [PATCH] Update for WebGPU latest --- Image-Loading-and-Displaying-Examples.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Image-Loading-and-Displaying-Examples.md b/Image-Loading-and-Displaying-Examples.md index a4d13ac..222378d 100644 --- a/Image-Loading-and-Displaying-Examples.md +++ b/Image-Loading-and-Displaying-Examples.md @@ -1145,8 +1145,7 @@ bool LoadTextureFromMemory(const void* data, size_t data_size, WGPUDevice device return false; // Create a WebGPU texture - WGPUTextureDescriptor tex_desc; - tex_desc.nextInChain = NULL; + WGPUTextureDescriptor tex_desc = {}; tex_desc.label = { "", WGPU_STRLEN }; tex_desc.usage = WGPUTextureUsage_CopyDst | WGPUTextureUsage_TextureBinding; tex_desc.dimension = WGPUTextureDimension_2D; @@ -1156,13 +1155,10 @@ bool LoadTextureFromMemory(const void* data, size_t data_size, WGPUDevice device tex_desc.format = WGPUTextureFormat_RGBA8Unorm; tex_desc.mipLevelCount = 1; tex_desc.sampleCount = 1; - tex_desc.viewFormatCount = 0; - tex_desc.viewFormats = NULL; WGPUTexture image_texture = wgpuDeviceCreateTexture(device, &tex_desc); // Create a WebGPU texture view - WGPUTextureViewDescriptor view_desc; - view_desc.nextInChain = NULL; + WGPUTextureViewDescriptor view_desc = {}; view_desc.label = { "", WGPU_STRLEN }; view_desc.format = WGPUTextureFormat_RGBA8Unorm; view_desc.dimension = WGPUTextureViewDimension_2D;