From b74b7fdd8ca3c31331dda5b3bc07346125b6a801 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Thu, 28 Feb 2019 06:36:45 +0100 Subject: [PATCH] Update textureformats in examples --- examples/hello_triangle_c/main.c | 4 ++-- examples/hello_triangle_rust/main.rs | 4 ++-- gfx-examples/src/cube.rs | 2 +- gfx-examples/src/framework.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/hello_triangle_c/main.c b/examples/hello_triangle_c/main.c index 4a130ff41..ca6923815 100644 --- a/examples/hello_triangle_c/main.c +++ b/examples/hello_triangle_c/main.c @@ -136,7 +136,7 @@ int main() WGPUAttachment attachments[ATTACHMENTS_LENGTH] = { { - .format = WGPUTextureFormat_B8g8r8a8Unorm, + .format = WGPUTextureFormat_Bgra8Unorm, .samples = 1, }, }; @@ -202,7 +202,7 @@ int main() WGPUSwapChainDescriptor swap_chain_desc = { .usage = WGPUTextureUsageFlags_OUTPUT_ATTACHMENT | WGPUTextureUsageFlags_PRESENT, - .format = WGPUTextureFormat_B8g8r8a8Unorm, + .format = WGPUTextureFormat_Bgra8Unorm, .width = 640, .height = 480, }; diff --git a/examples/hello_triangle_rust/main.rs b/examples/hello_triangle_rust/main.rs index 6958bd8ad..5362fe033 100644 --- a/examples/hello_triangle_rust/main.rs +++ b/examples/hello_triangle_rust/main.rs @@ -45,7 +45,7 @@ fn main() { primitive_topology: wgpu::PrimitiveTopology::TriangleList, color_states: &[ wgpu::ColorStateDescriptor { - format: wgpu::TextureFormat::B8g8r8a8Unorm, + format: wgpu::TextureFormat::Bgra8Unorm, color: wgpu::BlendDescriptor::REPLACE, alpha: wgpu::BlendDescriptor::REPLACE, write_mask: wgpu::ColorWriteFlags::ALL, @@ -69,7 +69,7 @@ fn main() { let surface = instance.create_surface(&window); let mut swap_chain = device.create_swap_chain(&surface, &wgpu::SwapChainDescriptor { usage: wgpu::TextureUsageFlags::OUTPUT_ATTACHMENT, - format: wgpu::TextureFormat::B8g8r8a8Unorm, + format: wgpu::TextureFormat::Bgra8Unorm, width: size.width as u32, height: size.height as u32, }); diff --git a/gfx-examples/src/cube.rs b/gfx-examples/src/cube.rs index fd38702d1..b96223dfb 100644 --- a/gfx-examples/src/cube.rs +++ b/gfx-examples/src/cube.rs @@ -176,7 +176,7 @@ impl framework::Example for Example { size: texture_extent, array_size: 1, dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::R8g8b8a8Unorm, + format: wgpu::TextureFormat::Rgba8Unorm, usage: wgpu::TextureUsageFlags::SAMPLED | wgpu::TextureUsageFlags::TRANSFER_DST, }); let texture_view = texture.create_default_view(); diff --git a/gfx-examples/src/framework.rs b/gfx-examples/src/framework.rs index 69df4efbd..3457ec7f3 100644 --- a/gfx-examples/src/framework.rs +++ b/gfx-examples/src/framework.rs @@ -78,7 +78,7 @@ pub fn run(title: &str) { let surface = instance.create_surface(&window); let mut sc_desc = wgpu::SwapChainDescriptor { usage: wgpu::TextureUsageFlags::OUTPUT_ATTACHMENT, - format: wgpu::TextureFormat::B8g8r8a8Unorm, + format: wgpu::TextureFormat::Bgra8Unorm, width: size.width as u32, height: size.height as u32, };