Update textureformats in examples

This commit is contained in:
Steven Wittens 2019-02-28 06:36:45 +01:00
parent 9151510b24
commit b74b7fdd8c
4 changed files with 6 additions and 6 deletions

View File

@ -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,
};

View File

@ -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,
});

View File

@ -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();

View File

@ -78,7 +78,7 @@ pub fn run<E: Example>(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,
};