Introduce GraphicsInformation to iced_graphics
This commit is contained in:
parent
ced5f5075f
commit
e23e4b8db2
2 changed files with 10 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ mod compositor;
|
||||||
#[cfg(feature = "opengl")]
|
#[cfg(feature = "opengl")]
|
||||||
mod gl_compositor;
|
mod gl_compositor;
|
||||||
|
|
||||||
pub use compositor::{Compositor, SurfaceError};
|
pub use compositor::{Compositor, GraphicsInformation, SurfaceError};
|
||||||
|
|
||||||
#[cfg(feature = "opengl")]
|
#[cfg(feature = "opengl")]
|
||||||
pub use gl_compositor::GLCompositor;
|
pub use gl_compositor::GLCompositor;
|
||||||
|
|
|
||||||
|
|
@ -71,3 +71,12 @@ pub enum SurfaceError {
|
||||||
#[error("There is no more memory left to allocate a new frame")]
|
#[error("There is no more memory left to allocate a new frame")]
|
||||||
OutOfMemory,
|
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,
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue