use crate::bind_groups::{AwsmBindGroupError, BindGroupRecreateContext};
use crate::error::Result;
use crate::render_passes::RenderPassInitContext;
pub struct LightCullingBindGroups {
_bind_group: Option<web_sys::GpuBindGroup>,
}
impl LightCullingBindGroups {
pub async fn new(_ctx: &mut RenderPassInitContext<'_>) -> Result<Self> {
Ok(Self {
_bind_group: None,
})
}
pub fn get_bind_group(
&self,
) -> std::result::Result<&web_sys::GpuBindGroup, AwsmBindGroupError> {
self._bind_group
.as_ref()
.ok_or_else(|| AwsmBindGroupError::NotFound("Light Culling".to_string()))
}
pub fn recreate(&mut self, _ctx: &BindGroupRecreateContext<'_>) -> Result<()> {
Ok(())
}
}