pub struct SurfmanFrameContext {
pub gleam_gl: Rc<dyn Gl>,
pub glow_gl: Arc<Context>,
pub device: RefCell<Device>,
pub context: RefCell<Context>,
}Fields§
§gleam_gl: Rc<dyn Gl>§glow_gl: Arc<Context>§device: RefCell<Device>§context: RefCell<Context>Implementations§
Source§impl SurfmanFrameContext
impl SurfmanFrameContext
pub fn new(connection: &Connection, adapter: &Adapter) -> Result<Self, Error>
pub fn create_surface( &self, surface_type: SurfaceType<NativeWidget>, ) -> Result<Surface, Error>
pub fn bind_surface(&self, surface: Surface) -> Result<(), Error>
pub fn unbind_surface(&self) -> Result<Option<Surface>, Error>
pub fn create_attached_swap_chain(&self) -> Result<SwapChain<Device>, Error>
pub fn make_current(&self) -> Result<(), Error>
pub fn prepare_for_rendering(&self)
pub fn read_to_image_region( &self, x: i32, y: i32, width: i32, height: i32, ) -> Option<RgbaImage>
pub fn create_texture( &self, surface: Surface, ) -> Option<(SurfaceTexture, u32, Size2D<i32>)>
pub fn destroy_texture( &self, surface_texture: SurfaceTexture, ) -> Option<Surface>
pub fn connection(&self) -> Option<Connection>
Trait Implementations§
Source§impl Drop for SurfmanFrameContext
impl Drop for SurfmanFrameContext
Auto Trait Implementations§
impl !Freeze for SurfmanFrameContext
impl !RefUnwindSafe for SurfmanFrameContext
impl !Send for SurfmanFrameContext
impl !Sync for SurfmanFrameContext
impl !UnwindSafe for SurfmanFrameContext
impl Unpin for SurfmanFrameContext
impl UnsafeUnpin for SurfmanFrameContext
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