mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
Update textureformats in examples
This commit is contained in:
parent
9151510b24
commit
b74b7fdd8c
@ -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,
|
||||
};
|
||||
|
@ -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,
|
||||
});
|
||||
|
@ -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();
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user