pub struct Renderer {
pub meshes: HashMap<MeshHandle, Mesh>,
pub lights: HashMap<LightHandle, Light>,
pub textures: HashMap<TextureHandle, GLuint>,
pub models: HashMap<ModelHandle, Model>,
pub skeletal_meshes: HashMap<SkeletalMeshHandle, SkeletalMesh>,
pub camera: Camera,
}Fields§
§meshes: HashMap<MeshHandle, Mesh>§lights: HashMap<LightHandle, Light>§textures: HashMap<TextureHandle, GLuint>§models: HashMap<ModelHandle, Model>§skeletal_meshes: HashMap<SkeletalMeshHandle, SkeletalMesh>§camera: CameraImplementations§
Source§impl Renderer
impl Renderer
pub fn add_mesh_from_vertices_and_indices( &mut self, vertices: Vec<Vertex>, indices: Vec<u32>, ) -> Option<MeshHandle>
pub fn add_mesh(&mut self, mesh: Mesh) -> Option<MeshHandle>
pub fn get_mesh_mut(&mut self, handle: MeshHandle) -> Option<&mut Mesh>
pub fn get_mesh(&self, handle: MeshHandle) -> Option<&Mesh>
pub fn destroy_mesh(&mut self, handle: MeshHandle)
Source§impl Renderer
impl Renderer
pub fn add_texture(&mut self, path: &str) -> Option<TextureHandle>
pub fn destroy_texture(&mut self, handle: TextureHandle)
Source§impl Renderer
impl Renderer
pub unsafe fn send_light_uniforms(&self, shader: &Shader)
pub fn add_light(&mut self, light: Light) -> Option<LightHandle>
pub fn destroy_light(&mut self, handle: LightHandle)
Source§impl Renderer
impl Renderer
pub fn add_model(&mut self, model: Model) -> Option<ModelHandle>
pub fn destroy_model(&mut self, handle: ModelHandle)
Source§impl Renderer
impl Renderer
pub fn add_skeletal_mesh_from_vertices_and_indices( &mut self, vertices: Vec<SkeletalVertex>, indices: Vec<u32>, ) -> Option<SkeletalMeshHandle>
pub fn add_skeletal_mesh( &mut self, mesh: SkeletalMesh, ) -> Option<SkeletalMeshHandle>
pub fn get_skeletal_mesh_mut( &mut self, handle: SkeletalMeshHandle, ) -> Option<&mut SkeletalMesh>
pub fn get_skeletal_mesh( &self, handle: SkeletalMeshHandle, ) -> Option<&SkeletalMesh>
pub fn destroy_skeletal_mesh(&mut self, handle: SkeletalMeshHandle)
Auto Trait Implementations§
impl Freeze for Renderer
impl RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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