diff options
Diffstat (limited to 'glow/src')
-rw-r--r-- | glow/src/backend.rs | 4 | ||||
-rw-r--r-- | glow/src/lib.rs | 2 | ||||
-rw-r--r-- | glow/src/program.rs | 8 | ||||
-rw-r--r-- | glow/src/settings.rs | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/glow/src/backend.rs b/glow/src/backend.rs index 416c3b94..36a34eda 100644 --- a/glow/src/backend.rs +++ b/glow/src/backend.rs @@ -22,7 +22,7 @@ pub struct Backend { quad_pipeline: quad::Pipeline, text_pipeline: text::Pipeline, triangle_pipeline: triangle::Pipeline, - default_text_size: u16, + default_text_size: f32, } impl Backend { @@ -228,7 +228,7 @@ impl backend::Text for Backend { const CHECKMARK_ICON: char = font::CHECKMARK_ICON; const ARROW_DOWN_ICON: char = font::ARROW_DOWN_ICON; - fn default_size(&self) -> u16 { + fn default_size(&self) -> f32 { self.default_text_size } diff --git a/glow/src/lib.rs b/glow/src/lib.rs index a12c45b8..9e7de0d9 100644 --- a/glow/src/lib.rs +++ b/glow/src/lib.rs @@ -3,7 +3,7 @@ //!  //! //! [`glow`]: https://github.com/grovesNL/glow -//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.7/native +//! [`iced_native`]: https://github.com/iced-rs/iced/tree/0.8/native #![doc( html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg" )] diff --git a/glow/src/program.rs b/glow/src/program.rs index e2155222..95437fcd 100644 --- a/glow/src/program.rs +++ b/glow/src/program.rs @@ -17,17 +17,17 @@ impl Version { ) { // OpenGL 3.0+ (3, 0 | 1 | 2, false) => ( - format!("#version 1{}0", version.minor + 3), + format!("#version 1{}0\n#extension GL_ARB_explicit_attrib_location : enable", version.minor + 3), format!( - "#version 1{}0\n#define HIGHER_THAN_300 1", + "#version 1{}0\n#extension GL_ARB_explicit_attrib_location : enable\n#define HIGHER_THAN_300 1", version.minor + 3 ), ), // OpenGL 3.3+ (3 | 4, _, false) => ( - format!("#version {}{}0", version.major, version.minor), + format!("#version {}{}0\n#extension GL_ARB_explicit_attrib_location : enable", version.major, version.minor), format!( - "#version {}{}0\n#define HIGHER_THAN_300 1", + "#version {}{}0\n#extension GL_ARB_explicit_attrib_location : enable\n#define HIGHER_THAN_300 1", version.major, version.minor ), ), diff --git a/glow/src/settings.rs b/glow/src/settings.rs index 3691747b..8ccffbad 100644 --- a/glow/src/settings.rs +++ b/glow/src/settings.rs @@ -4,7 +4,7 @@ pub use iced_graphics::Antialiasing; /// The settings of a [`Backend`]. /// /// [`Backend`]: crate::Backend -#[derive(Clone, Copy, PartialEq, Eq)] +#[derive(Clone, Copy, PartialEq)] pub struct Settings { /// The bytes of the font that will be used by default. /// @@ -13,8 +13,8 @@ pub struct Settings { /// The default size of text. /// - /// By default, it will be set to 20. - pub default_text_size: u16, + /// By default, it will be set to `20.0`. + pub default_text_size: f32, /// If enabled, spread text workload in multiple threads when multiple cores /// are available. @@ -32,7 +32,7 @@ impl Default for Settings { fn default() -> Settings { Settings { default_font: None, - default_text_size: 20, + default_text_size: 20.0, text_multithreading: false, antialiasing: None, } |