Skip to content

Commit b74b7fd

Browse files
committed
Update textureformats in examples
1 parent 9151510 commit b74b7fd

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

examples/hello_triangle_c/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ int main()
136136

137137
WGPUAttachment attachments[ATTACHMENTS_LENGTH] = {
138138
{
139-
.format = WGPUTextureFormat_B8g8r8a8Unorm,
139+
.format = WGPUTextureFormat_Bgra8Unorm,
140140
.samples = 1,
141141
},
142142
};
@@ -202,7 +202,7 @@ int main()
202202

203203
WGPUSwapChainDescriptor swap_chain_desc = {
204204
.usage = WGPUTextureUsageFlags_OUTPUT_ATTACHMENT | WGPUTextureUsageFlags_PRESENT,
205-
.format = WGPUTextureFormat_B8g8r8a8Unorm,
205+
.format = WGPUTextureFormat_Bgra8Unorm,
206206
.width = 640,
207207
.height = 480,
208208
};

examples/hello_triangle_rust/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn main() {
4545
primitive_topology: wgpu::PrimitiveTopology::TriangleList,
4646
color_states: &[
4747
wgpu::ColorStateDescriptor {
48-
format: wgpu::TextureFormat::B8g8r8a8Unorm,
48+
format: wgpu::TextureFormat::Bgra8Unorm,
4949
color: wgpu::BlendDescriptor::REPLACE,
5050
alpha: wgpu::BlendDescriptor::REPLACE,
5151
write_mask: wgpu::ColorWriteFlags::ALL,
@@ -69,7 +69,7 @@ fn main() {
6969
let surface = instance.create_surface(&window);
7070
let mut swap_chain = device.create_swap_chain(&surface, &wgpu::SwapChainDescriptor {
7171
usage: wgpu::TextureUsageFlags::OUTPUT_ATTACHMENT,
72-
format: wgpu::TextureFormat::B8g8r8a8Unorm,
72+
format: wgpu::TextureFormat::Bgra8Unorm,
7373
width: size.width as u32,
7474
height: size.height as u32,
7575
});

gfx-examples/src/cube.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl framework::Example for Example {
176176
size: texture_extent,
177177
array_size: 1,
178178
dimension: wgpu::TextureDimension::D2,
179-
format: wgpu::TextureFormat::R8g8b8a8Unorm,
179+
format: wgpu::TextureFormat::Rgba8Unorm,
180180
usage: wgpu::TextureUsageFlags::SAMPLED | wgpu::TextureUsageFlags::TRANSFER_DST,
181181
});
182182
let texture_view = texture.create_default_view();

gfx-examples/src/framework.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub fn run<E: Example>(title: &str) {
7878
let surface = instance.create_surface(&window);
7979
let mut sc_desc = wgpu::SwapChainDescriptor {
8080
usage: wgpu::TextureUsageFlags::OUTPUT_ATTACHMENT,
81-
format: wgpu::TextureFormat::B8g8r8a8Unorm,
81+
format: wgpu::TextureFormat::Bgra8Unorm,
8282
width: size.width as u32,
8383
height: size.height as u32,
8484
};

0 commit comments

Comments
 (0)