Expand description
Bottomles Pit supports multipass rendering. This means you can go through multiple render passes within the Game::render function. This can be used to render to a texture then render to the screen. The RenderHandle is used to create render passes and then within the passes the Renderer is used to actually interface with materials and other objects that render.
impl Game for MyCoolGame {
fn render<'o>(&'o mut self, mut render_handle: RenderHandle<'o>) {
{
let mut p1 = render_handle.begin_texture_pass(&mut self.uniform_texture, Colour::WHITE);
// render what ever you want to the texture
}
let mut p2 = render_handle.begin_pass(Colour::Black);
// render whatever you want to the screen
}
}Structsยง
- Render
Handle - The renderer is used to create render passes or Renderers
- Renderer
- Use the Renderer with Materials to draw things to the current render surface