diff options
Diffstat (limited to 'src/gpu/texture_manager.cc')
| -rw-r--r-- | src/gpu/texture_manager.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpu/texture_manager.cc b/src/gpu/texture_manager.cc index 7c314d2..4240245 100644 --- a/src/gpu/texture_manager.cc +++ b/src/gpu/texture_manager.cc @@ -40,8 +40,7 @@ void TextureManager::create_procedural_texture( // 2. Create GPU Texture WGPUTextureDescriptor tex_desc = {}; - tex_desc.usage = - WGPUTextureUsage_TextureBinding | WGPUTextureUsage_CopyDst; + tex_desc.usage = WGPUTextureUsage_TextureBinding | WGPUTextureUsage_CopyDst; tex_desc.dimension = WGPUTextureDimension_2D; tex_desc.size = tex_size; tex_desc.format = WGPUTextureFormat_RGBA8Unorm; @@ -70,7 +69,6 @@ void TextureManager::create_procedural_texture( wgpuQueueWriteTexture(queue_, &destination, pixel_data.data(), pixel_data.size(), &source_layout, &tex_size); - // 4. Create View WGPUTextureViewDescriptor view_desc = {}; view_desc.format = WGPUTextureFormat_RGBA8Unorm; @@ -89,7 +87,7 @@ void TextureManager::create_procedural_texture( gpu_tex.view = view; gpu_tex.width = def.width; gpu_tex.height = def.height; - + textures_[name] = gpu_tex; #if !defined(STRIP_ALL) |
