Skip to content

Commit

Permalink
Add RLDES to rust
Browse files Browse the repository at this point in the history
  • Loading branch information
CouleeApps committed Jan 30, 2025
1 parent 0232317 commit 7488370
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rust/src/render_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ pub struct CoreRenderLayer {
pub(crate) handle: NonNull<BNRenderLayer>,
}

pub type RenderLayerDefaultEnableState = BNRenderLayerDefaultEnableState;

impl CoreRenderLayer {
pub fn from_raw(handle: NonNull<BNRenderLayer>) -> Self {
Self { handle }
Expand All @@ -261,6 +263,14 @@ impl CoreRenderLayer {
NonNull::new(result).map(|x| Self::from_raw(x))
}

pub fn default_enable_state(&self) -> RenderLayerDefaultEnableState {
unsafe { BNGetRenderLayerDefaultEnableState(self.handle.as_ptr()) }
}

pub fn set_default_enable_state(&self, enable_state: RenderLayerDefaultEnableState) {
unsafe { BNSetRenderLayerDefaultEnableState(self.handle.as_ptr(), enable_state) }
}

pub fn apply_to_flow_graph(&self, graph: &FlowGraph) {
unsafe { BNApplyRenderLayerToFlowGraph(self.handle.as_ptr(), graph.handle) }
}
Expand Down

0 comments on commit 7488370

Please sign in to comment.