box CompositionLayerColorScaleBiasKHR

This commit is contained in:
galister 2026-02-28 13:10:02 +09:00
parent ab3f873a38
commit f21776b123
1 changed files with 13 additions and 11 deletions

View File

@ -31,7 +31,7 @@ pub(super) struct Skybox {
view: Arc<ImageView>, view: Arc<ImageView>,
sky: Option<WlxSwapchain>, sky: Option<WlxSwapchain>,
grid: Option<WlxSwapchain>, grid: Option<WlxSwapchain>,
grid_color_scale_bias_khr: Option<xr::sys::CompositionLayerColorScaleBiasKHR>, grid_color_scale_bias_khr: Option<Box<xr::sys::CompositionLayerColorScaleBiasKHR>>,
} }
impl Skybox { impl Skybox {
@ -82,7 +82,8 @@ impl Skybox {
.instance .instance
.exts() .exts()
.khr_composition_layer_color_scale_bias .khr_composition_layer_color_scale_bias
.map(|_| xr::sys::CompositionLayerColorScaleBiasKHR { .map(|_| {
Box::new(xr::sys::CompositionLayerColorScaleBiasKHR {
ty: xr::StructureType::COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR, ty: xr::StructureType::COMPOSITION_LAYER_COLOR_SCALE_BIAS_KHR,
next: std::ptr::null(), next: std::ptr::null(),
color_bias: Default::default(), color_bias: Default::default(),
@ -92,6 +93,7 @@ impl Skybox {
b: 1.0, b: 1.0,
a: 1.0, a: 1.0,
}, },
})
}); });
Ok(Self { Ok(Self {