pub struct HaRenderer {
    pub virtual_images: Resources<VirtualImage>,
    pub virtual_meshes: Resources<VirtualMesh>,
    /* private fields */
}

Fields§

§virtual_images: Resources<VirtualImage>§virtual_meshes: Resources<VirtualMesh>

Implementations§

source§

impl HaRenderer

source

pub fn new<PI>(platform_interface: PI) -> Selfwhere PI: HaPlatformInterface + Send + Sync + 'static,

source

pub fn new_raw( platform_interface: Box<dyn HaPlatformInterface + Send + Sync> ) -> Self

source

pub fn screen_size(&self) -> (usize, usize)

source

pub fn interface(&self) -> &dyn HaPlatformInterface

source

pub fn interface_mut(&mut self) -> &mut dyn HaPlatformInterface

source

pub fn stats(&self) -> &RenderStats

source

pub fn info(&self) -> HaRendererInfo

source

pub fn detailed_info( &self, filter: &HaRendererDetailedInfoFilter ) -> HaRendererDetailedInfo

source

pub fn register_stage<T: 'static>(&mut self, id: &str)

source

pub fn with_stage<T: 'static>(self, id: &str) -> Self

source

pub fn stages(&self) -> impl Iterator<Item = (&str, TypeId, &str)>

source

pub fn unregister_stage(&mut self, id: &str)

source

pub fn register_pipeline(&mut self, id: impl ToString, data: PipelineDescriptor)

source

pub fn with_pipeline(self, id: impl ToString, data: PipelineDescriptor) -> Self

source

pub fn unregister_pipeline(&mut self, id: &str)

source

pub fn add_pipeline( &mut self, source: PipelineSource ) -> Result<PipelineId, PipelineError>

source

pub fn remove_pipeline(&mut self, id: PipelineId) -> Result<(), PipelineError>

source

pub fn pipelines(&self) -> impl Iterator<Item = PipelineId> + '_

source

pub fn pipeline(&self, id: PipelineId) -> Option<&Pipeline>

source

pub fn render_targets(&self) -> &Resources<RenderTarget>

source

pub fn add_render_target( &mut self, data: RenderTarget ) -> Result<RenderTargetId, RenderTargetError>

source

pub fn remove_render_target( &mut self, id: RenderTargetId ) -> Result<(), RenderTargetError>

source

pub fn render_target(&self, id: RenderTargetId) -> Option<&RenderTarget>

source

pub fn render_target_mut( &mut self, id: RenderTargetId ) -> Option<&mut RenderTarget>

source

pub fn meshes(&self) -> &Resources<Mesh>

source

pub fn add_mesh(&mut self, data: Mesh) -> Result<MeshId, MeshError>

source

pub fn remove_mesh(&mut self, id: MeshId) -> Result<(), MeshError>

source

pub fn mesh(&self, id: MeshId) -> Option<&Mesh>

source

pub fn mesh_mut(&mut self, id: MeshId) -> Option<&mut Mesh>

source

pub fn images(&self) -> &Resources<Image>

source

pub fn add_image(&mut self, data: Image) -> Result<ImageId, ImageError>

source

pub fn remove_image(&mut self, id: ImageId) -> Result<(), ImageError>

source

pub fn image(&self, id: ImageId) -> Option<&Image>

source

pub fn image_mut(&mut self, id: ImageId) -> Option<&mut Image>

source

pub fn materials(&self) -> &Resources<Material>

source

pub fn add_material( &mut self, data: Material ) -> Result<MaterialId, MaterialError>

source

pub fn remove_material(&mut self, id: MaterialId) -> Result<(), MaterialError>

source

pub fn material(&self, id: MaterialId) -> Option<&Material>

source

pub fn error_reporter(&self) -> &dyn HaRendererErrorReporter

source

pub fn set_error_reporter<R>(&mut self, error_reporter: R)where R: HaRendererErrorReporter + 'static,

source

pub fn report_error(&self, error: impl Into<Error>)

Trait Implementations§

source§

impl Debug for HaRenderer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Finalize for T

§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

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> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

§

type Error = Infallible

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

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

Performs the conversion.
source§

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

§

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

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

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Component for Twhere T: Send + Sync + 'static,