pub struct RenderLayer { /* private fields */ }Expand description
Represents the rendering priority layer for draw call ordering.
Higher z-index values are drawn on top of lower values, enabling correct visual layering of game objects.
Implementations§
Source§impl RenderLayer
Implements construction methods for RenderLayer.
impl RenderLayer
Implements construction methods for RenderLayer.
Sourcepub fn create(z_index: i32, visible: bool) -> RenderLayer
pub fn create(z_index: i32, visible: bool) -> RenderLayer
Sourcepub fn background() -> RenderLayer
pub fn background() -> RenderLayer
Creates a background render layer with z-index 0 and visibility enabled.
§Returns
RenderLayer- The background layer.
Sourcepub fn foreground() -> RenderLayer
pub fn foreground() -> RenderLayer
Creates a foreground render layer with a high z-index and visibility enabled.
§Returns
RenderLayer- The foreground layer.
Sourcepub fn ui() -> RenderLayer
pub fn ui() -> RenderLayer
Creates a UI overlay render layer with the highest z-index and visibility enabled.
§Returns
RenderLayer- The UI overlay layer.
Source§impl RenderLayer
impl RenderLayer
pub fn get_z_index(&self) -> i32
pub fn get_mut_z_index(&mut self) -> &mut i32
pub fn set_z_index(&mut self, val: i32) -> &mut Self
pub fn get_visible(&self) -> bool
pub fn get_mut_visible(&mut self) -> &mut bool
pub fn set_visible(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for RenderLayer
impl Clone for RenderLayer
Source§fn clone(&self) -> RenderLayer
fn clone(&self) -> RenderLayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RenderLayer
Source§impl Debug for RenderLayer
impl Debug for RenderLayer
Source§impl Default for RenderLayer
impl Default for RenderLayer
Source§fn default() -> RenderLayer
fn default() -> RenderLayer
Returns the “default value” for a type. Read more
impl Eq for RenderLayer
Source§impl Hash for RenderLayer
impl Hash for RenderLayer
Source§impl Ord for RenderLayer
impl Ord for RenderLayer
Source§fn cmp(&self, other: &RenderLayer) -> Ordering
fn cmp(&self, other: &RenderLayer) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RenderLayer
impl PartialEq for RenderLayer
Source§fn eq(&self, other: &RenderLayer) -> bool
fn eq(&self, other: &RenderLayer) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RenderLayer
impl PartialOrd for RenderLayer
impl StructuralPartialEq for RenderLayer
Auto Trait Implementations§
impl Freeze for RenderLayer
impl RefUnwindSafe for RenderLayer
impl Send for RenderLayer
impl Sync for RenderLayer
impl Unpin for RenderLayer
impl UnsafeUnpin for RenderLayer
impl UnwindSafe for RenderLayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more