Introduce GraphicsInformation to iced_graphics

This commit is contained in:
Richard 2022-03-17 00:25:00 -03:00
parent ced5f5075f
commit e23e4b8db2
2 changed files with 10 additions and 1 deletions

View file

@ -4,7 +4,7 @@ mod compositor;
#[cfg(feature = "opengl")]
mod gl_compositor;
pub use compositor::{Compositor, SurfaceError};
pub use compositor::{Compositor, GraphicsInformation, SurfaceError};
#[cfg(feature = "opengl")]
pub use gl_compositor::GLCompositor;

View file

@ -71,3 +71,12 @@ pub enum SurfaceError {
#[error("There is no more memory left to allocate a new frame")]
OutOfMemory,
}
/// Contains informations about the graphics (e.g. graphics adapter, graphics backend).
#[derive(Debug)]
pub struct GraphicsInformation {
/// Contains the graphics adapter.
pub adapter: String,
/// Contains the graphics backend.
pub backend: String,
}