Struct luminance_front::render_state::RenderState
source · [−]pub struct RenderState { /* private fields */ }
Expand description
GPU render state.
You can get a default value with RenderState::default
and set the operations you want with the
various RenderState::set_*
methods.
Implementations
sourceimpl RenderState
impl RenderState
sourcepub fn set_blending<B>(self, blending: B) -> RenderState where
B: Into<Option<Blending>>,
pub fn set_blending<B>(self, blending: B) -> RenderState where
B: Into<Option<Blending>>,
Override the blending configuration.
sourcepub fn set_blending_separate(
self,
blending_rgb: Blending,
blending_alpha: Blending
) -> RenderState
pub fn set_blending_separate(
self,
blending_rgb: Blending,
blending_alpha: Blending
) -> RenderState
Override the blending configuration using separate blending.
sourcepub fn blending(&self) -> Option<BlendingMode>
pub fn blending(&self) -> Option<BlendingMode>
Blending configuration.
sourcepub fn set_depth_test<D>(self, depth_test: D) -> RenderState where
D: Into<Option<Comparison>>,
pub fn set_depth_test<D>(self, depth_test: D) -> RenderState where
D: Into<Option<Comparison>>,
Override the depth test configuration.
sourcepub fn depth_test(&self) -> Option<Comparison>
pub fn depth_test(&self) -> Option<Comparison>
Depth test configuration.
sourcepub fn set_depth_write(self, depth_write: Write) -> RenderState
pub fn set_depth_write(self, depth_write: Write) -> RenderState
Override the depth write configuration.
sourcepub fn depth_write(&self) -> Write
pub fn depth_write(&self) -> Write
Depth write configuration.
sourcepub fn set_stencil_test(
self,
stencil_test: impl Into<Option<StencilTest>>
) -> RenderState
pub fn set_stencil_test(
self,
stencil_test: impl Into<Option<StencilTest>>
) -> RenderState
Override the stencil test configuration.
sourcepub fn stencil_test(&self) -> Option<&StencilTest>
pub fn stencil_test(&self) -> Option<&StencilTest>
Stencil test configuration.
sourcepub fn set_stencil_operations(
self,
stencil_operations: StencilOperations
) -> RenderState
pub fn set_stencil_operations(
self,
stencil_operations: StencilOperations
) -> RenderState
Override the stencil operations.
sourcepub fn stencil_operations(&self) -> &StencilOperations
pub fn stencil_operations(&self) -> &StencilOperations
Stencil test operations.
sourcepub fn set_face_culling<FC>(self, face_culling: FC) -> RenderState where
FC: Into<Option<FaceCulling>>,
pub fn set_face_culling<FC>(self, face_culling: FC) -> RenderState where
FC: Into<Option<FaceCulling>>,
Override the face culling configuration.
sourcepub fn face_culling(&self) -> Option<FaceCulling>
pub fn face_culling(&self) -> Option<FaceCulling>
Face culling configuration.
sourcepub fn set_scissor<SR>(self, scissor: SR) -> RenderState where
SR: Into<Option<ScissorRegion>>,
pub fn set_scissor<SR>(self, scissor: SR) -> RenderState where
SR: Into<Option<ScissorRegion>>,
Override the scissor configuration.
sourcepub fn scissor(&self) -> &Option<ScissorRegion>
pub fn scissor(&self) -> &Option<ScissorRegion>
Get the scissor configuration.
Trait Implementations
sourceimpl Clone for RenderState
impl Clone for RenderState
sourcefn clone(&self) -> RenderState
fn clone(&self) -> RenderState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RenderState
impl Debug for RenderState
sourceimpl Default for RenderState
impl Default for RenderState
sourcefn default() -> RenderState
fn default() -> RenderState
The default RenderState
.
blending
:None
depth_test
:Some(Comparison::Less)
depth_write
:Write::On
stencil_test
:None
stencil_operations
:StencilOperations::default()
face_culling
:None
- ’scissor_region
:
None`
sourceimpl PartialEq<RenderState> for RenderState
impl PartialEq<RenderState> for RenderState
sourcefn eq(&self, other: &RenderState) -> bool
fn eq(&self, other: &RenderState) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RenderState) -> bool
fn ne(&self, other: &RenderState) -> bool
This method tests for !=
.
impl Eq for RenderState
impl StructuralEq for RenderState
impl StructuralPartialEq for RenderState
Auto Trait Implementations
impl RefUnwindSafe for RenderState
impl Send for RenderState
impl Sync for RenderState
impl Unpin for RenderState
impl UnwindSafe for RenderState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more