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