mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 04:48:27 +00:00
Add version to OpenGLAPI
This commit is contained in:
parent
97927ccee9
commit
3cc44dc670
4 changed files with 77 additions and 48 deletions
|
|
@ -283,13 +283,22 @@ impl<'a> core::fmt::Debug for GraphicsAPI<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// API Version
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct APIVersion {
|
||||
/// Major API version
|
||||
pub major: u8,
|
||||
/// Minor API version
|
||||
pub minor: u8,
|
||||
}
|
||||
|
||||
/// This enum specifies which OpenGL API should be used.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum OpenGLAPI {
|
||||
/// OpenGL
|
||||
GL,
|
||||
GL(Option<APIVersion>),
|
||||
/// OpenGL ES
|
||||
GLES,
|
||||
GLES(Option<APIVersion>),
|
||||
}
|
||||
|
||||
/// This enum specifies which OpenGL API should be used.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue