Skip to content

Commit f21776b

Browse files
committed
box CompositionLayerColorScaleBiasKHR
1 parent ab3f873 commit f21776b

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

wayvr/src/backend/openxr/skybox.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub(super) struct Skybox {
3131
view: Arc<ImageView>,
3232
sky: Option<WlxSwapchain>,
3333
grid: Option<WlxSwapchain>,
34-
grid_color_scale_bias_khr: Option<xr::sys::CompositionLayerColorScaleBiasKHR>,
34+
grid_color_scale_bias_khr: Option<Box<xr::sys::CompositionLayerColorScaleBiasKHR>>,
3535
}
3636

3737
impl Skybox {
@@ -82,16 +82,18 @@ impl Skybox {
8282
.instance
8383
.exts()
8484
.khr_composition_layer_color_scale_bias
85-
.map(|_| xr::sys::CompositionLayerColorScaleBiasKHR {
86-
ty: xr::StructureType::COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR,
87-
next: std::ptr::null(),
88-
color_bias: Default::default(),
89-
color_scale: xr::Color4f {
90-
r: 1.0,
91-
g: 1.0,
92-
b: 1.0,
93-
a: 1.0,
94-
},
85+
.map(|_| {
86+
Box::new(xr::sys::CompositionLayerColorScaleBiasKHR {
87+
ty: xr::StructureType::COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR,
88+
next: std::ptr::null(),
89+
color_bias: Default::default(),
90+
color_scale: xr::Color4f {
91+
r: 1.0,
92+
g: 1.0,
93+
b: 1.0,
94+
a: 1.0,
95+
},
96+
})
9597
});
9698

9799
Ok(Self {

0 commit comments

Comments
 (0)