Draft new iced_graphics crate 🎉

This commit is contained in:
Héctor Ramón Jiménez 2020-05-19 17:15:44 +02:00
parent d4743183d4
commit 05af8d00d4
100 changed files with 861 additions and 1755 deletions

View file

@ -53,7 +53,7 @@ impl iced_native::window::Backend for Backend {
.make_context_current(&self.gl_context)
.expect("Make context current");
Renderer::new(self.gl.as_ref().unwrap(), settings)
Renderer::new(crate::Backend::new(self.gl.as_ref().unwrap(), settings))
}
fn create_surface<W: HasRawWindowHandle>(
@ -151,8 +151,13 @@ impl iced_native::window::Backend for Backend {
gl.clear(glow::COLOR_BUFFER_BIT);
}
let mouse =
renderer.draw(gl, swap_chain, output, scale_factor, overlay);
let mouse = renderer.backend_mut().draw(
gl,
swap_chain,
output,
scale_factor,
overlay,
);
{
let mut surface = self

View file

@ -1,5 +0,0 @@
/// The rendering target of a window.
///
/// It represents a series of virtual framebuffers with a scale factor.
#[derive(Debug)]
pub struct SwapChain;