Struct tiny_game_framework::Renderer
source · pub struct Renderer {
pub models: HashMap<String, Model>,
pub meshes: HashMap<String, Mesh>,
pub instance_meshes: HashMap<String, InstanceMesh>,
pub lights: HashMap<String, Light>,
pub camera: Camera,
/* private fields */
}
Fields§
§models: HashMap<String, Model>
§meshes: HashMap<String, Mesh>
§instance_meshes: HashMap<String, InstanceMesh>
§lights: HashMap<String, Light>
§camera: Camera
Implementations§
source§impl Renderer
impl Renderer
pub fn add_mesh_from_vertices_and_indices( &mut self, name: &str, vertices: Vec<Vertex>, indices: Vec<u32>, ) -> Result<(), String>
pub fn add_mesh(&mut self, name: &str, mesh: Mesh) -> Result<(), String>
pub fn get_mesh_mut(&mut self, name: &str) -> Option<&mut Mesh>
pub fn get_mesh(&self, name: &str) -> Option<&Mesh>
pub fn destroy_mesh(&mut self, name: &str) -> Result<(), String>
source§impl Renderer
impl Renderer
pub fn add_instance_mesh( &mut self, name: &str, mesh: InstanceMesh, ) -> Result<(), String>
Auto Trait Implementations§
impl Freeze for Renderer
impl RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnwindSafe for Renderer
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more