pub struct EglContext {
egl_instance: Instance<Dynamic<Library, EGL1_5>>,
display: Display,
context: Context,
surface: Option<Surface>,
_config: Config,
dmabuf_supported: bool,
dmabuf_modifiers_supported: bool,
persistent_texture_id: Cell<Option<u32>>,
gpu_vendor: GpuVendor,
width: i32,
height: i32,
_wayland_display: Display,
}
Fields§
§egl_instance: Instance<Dynamic<Library, EGL1_5>>
§display: Display
§context: Context
§surface: Option<Surface>
§_config: Config
§dmabuf_supported: bool
§dmabuf_modifiers_supported: bool
§persistent_texture_id: Cell<Option<u32>>
§gpu_vendor: GpuVendor
§width: i32
§height: i32
§_wayland_display: Display
Implementations§
Source§impl EglContext
impl EglContext
pub fn new(width: i32, height: i32) -> Result<Self>
pub fn update_texture_from_image(&self, egl_image: Image) -> Result<()>
pub fn create_persistent_texture(&self) -> Result<()>
fn check_dmabuf_support( egl_instance: &Instance<Dynamic<Library, EGL1_5>>, display: Display, ) -> Result<(bool, bool)>
pub fn create_image_from_dmabuf( &self, planes: &[DmaBufPlane], format: u32, width: u32, height: u32, modifier: u64, ) -> Result<Image>
pub fn destroy_image(&self, image: Image) -> Result<()>
pub fn delete_texture(&self, texture_id: u32)
pub fn make_current(&self) -> Result<()>
pub fn release_current(&self) -> Result<()>
pub fn get_texture_id(&self) -> Option<u32>
pub fn get_gpu_vendor(&self) -> GpuVendor
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EglContext
impl !RefUnwindSafe for EglContext
impl Unpin for EglContext
impl !UnwindSafe for EglContext
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