pub struct Renderer {
pub _shader_collection: RefCell<ShaderCollection>,
/* private fields */
}
Fields§
§_shader_collection: RefCell<ShaderCollection>
Implementations§
Source§impl Renderer
impl Renderer
pub fn init() -> Result<Renderer, &'static str>
pub fn load_shader( &mut self, sources: &[(String, ShaderType)], ) -> Result<u64, &'static str>
pub fn load_texture( &mut self, description: String, image: &[u8], w: usize, h: usize, ) -> Result<u64, &'static str>
pub fn create_draw_group( &mut self, prim_type: RenderObjType, ) -> Result<(GLuint, GLuint, usize), &'static str>
pub fn add_obj(&mut self, name: &str, e: Ele) -> Result<usize, &'static str>
pub fn process_objs( renderer: &mut Renderer, group_index: usize, ) -> Result<(), &'static str>
pub fn reset_draw_group_data( &self, group_indices: &[usize], ) -> Result<(), &'static str>
pub fn bind_draw_group_data( &self, group_indices: &[usize], ) -> Result<(), &'static str>
pub fn drawcall_draw_group( renderer: &Renderer, group_indices: &[usize], ) -> Result<(), &'static str>
pub fn add_renderpass<T>(&mut self, name: String, rp: T) -> usizewhere
T: IRenderPass + 'static,
pub fn get_renderpass(&mut self, name: String) -> Option<&mut dyn IRenderPass>
pub fn add_draw_group_uniforms( &self, draw_group: usize, uniform_group: &[u64], ) -> Result<(), &'static str>
pub fn set_draw_group_uniforms( &self, draw_group: usize, uniform_group: &[u64], ) -> Result<(), &'static str>
pub fn clear_draw_group_uniforms( &self, draw_group: usize, ) -> Result<(), &'static str>
pub fn get_shader_program(&mut self, id: u64) -> Option<i64>
Trait Implementations§
Source§impl<GameLogic> AsMut<Renderer> for Kernel<GameLogic>where
GameLogic: IGameLogic<EventInput = <XformInput as IUi>::EventInputFiltered, EventRender = <Renderer as IRenderer>::EventRender>,
<GameLogic as IGameLogic>::RenderObj: Into<Vec<<GameLogic as IGameLogic>::EventRender>>,
impl<GameLogic> AsMut<Renderer> for Kernel<GameLogic>where
GameLogic: IGameLogic<EventInput = <XformInput as IUi>::EventInputFiltered, EventRender = <Renderer as IRenderer>::EventRender>,
<GameLogic as IGameLogic>::RenderObj: Into<Vec<<GameLogic as IGameLogic>::EventRender>>,
Source§impl<GameLogic> IKernel<WinGlutin, XformInput, GameLogic, Renderer> for Kernel<GameLogic>where
GameLogic: IGameLogic<EventInput = <XformInput as IUi>::EventInputFiltered, EventRender = <Renderer as IRenderer>::EventRender>,
<GameLogic as IGameLogic>::RenderObj: Into<Vec<<GameLogic as IGameLogic>::EventRender>>,
use default implementation for run method
impl<GameLogic> IKernel<WinGlutin, XformInput, GameLogic, Renderer> for Kernel<GameLogic>where
GameLogic: IGameLogic<EventInput = <XformInput as IUi>::EventInputFiltered, EventRender = <Renderer as IRenderer>::EventRender>,
<GameLogic as IGameLogic>::RenderObj: Into<Vec<<GameLogic as IGameLogic>::EventRender>>,
use default implementation for run method
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