pub struct EGLImages {
pub width: u32,
pub height: u32,
pub y_inverted: bool,
pub format: Format,
/* private fields */
}
Expand description
Images of the EGL-based WlBuffer
.
Fields§
§width: u32
Width in pixels
height: u32
Height in pixels
y_inverted: bool
If the y-axis is inverted or not
format: Format
Format of these images
Implementations§
source§impl EGLImages
impl EGLImages
sourcepub fn num_planes(&self) -> usize
pub fn num_planes(&self) -> usize
Amount of planes of these EGLImages
sourcepub unsafe fn bind_to_texture(
&self,
plane: usize,
tex_id: c_uint
) -> Result<(), TextureCreationError>
pub unsafe fn bind_to_texture(
&self,
plane: usize,
tex_id: c_uint
) -> Result<(), TextureCreationError>
Bind plane to an OpenGL texture id
This does only temporarily modify the OpenGL state any changes are reverted before returning.
Unsafety
The given tex_id
needs to be a valid GL texture otherwise undefined behavior might occur.