Implement iced_glutin 🎉
This commit is contained in:
parent
a1a5fcfd46
commit
e0e4ee73fe
31 changed files with 718 additions and 498 deletions
24
graphics/src/window/gl_compositor.rs
Normal file
24
graphics/src/window/gl_compositor.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
use crate::{Size, Viewport};
|
||||
use iced_native::mouse;
|
||||
|
||||
use core::ffi::c_void;
|
||||
|
||||
pub trait GLCompositor: Sized {
|
||||
type Renderer: iced_native::Renderer;
|
||||
type Settings: Default;
|
||||
|
||||
unsafe fn new(
|
||||
settings: Self::Settings,
|
||||
loader_function: impl FnMut(&str) -> *const c_void,
|
||||
) -> (Self, Self::Renderer);
|
||||
|
||||
fn resize_viewport(&mut self, physical_size: Size<u32>);
|
||||
|
||||
fn draw<T: AsRef<str>>(
|
||||
&mut self,
|
||||
renderer: &mut Self::Renderer,
|
||||
viewport: &Viewport,
|
||||
output: &<Self::Renderer as iced_native::Renderer>::Output,
|
||||
overlay: &[T],
|
||||
) -> mouse::Interaction;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue