⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

SoftwareRasterizer

Struct SoftwareRasterizer 

Source
pub struct SoftwareRasterizer {
Show 14 fields pub color_buffer: Vec<u32>, pub depth_buffer: Vec<i32>, pub width: u32, pub height: u32, pub viewport: Viewport, pub scissor: Option<ScissorRect>, pub depth_func: DepthFunc, pub depth_write: bool, pub depth_test: bool, pub blend_mode: BlendMode, pub texture: Option<SoftTexture>, pub shader: ShaderState, pub clear_color: u32, pub clear_depth: i32,
}
Expand description

Software rasterizer state

Fields§

§color_buffer: Vec<u32>

Output color buffer (ARGB8888)

§depth_buffer: Vec<i32>

Depth buffer (16.16 FP Z values)

§width: u32

Width in pixels

§height: u32

Height in pixels

§viewport: Viewport

Viewport

§scissor: Option<ScissorRect>

Scissor rectangle (None = disabled)

§depth_func: DepthFunc

Depth test function

§depth_write: bool

Depth write enabled

§depth_test: bool

Depth test enabled

§blend_mode: BlendMode

Blend mode

§texture: Option<SoftTexture>

Bound texture (index 0)

§shader: ShaderState

Shader state

§clear_color: u32

Clear color (ARGB8888)

§clear_depth: i32

Clear depth (16.16 FP)

Implementations§

Source§

impl SoftwareRasterizer

Source

pub fn new(width: u32, height: u32) -> Self

Auto Trait Implementations§

§

impl Freeze for SoftwareRasterizer

§

impl RefUnwindSafe for SoftwareRasterizer

§

impl Send for SoftwareRasterizer

§

impl Sync for SoftwareRasterizer

§

impl Unpin for SoftwareRasterizer

§

impl UnwindSafe for SoftwareRasterizer

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.