Use consistent color strategy in glyphon

This commit is contained in:
Héctor Ramón Jiménez 2023-06-01 03:10:02 +02:00
parent c528f2129e
commit b5fc0f4a3a
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 11 additions and 2 deletions

View file

@ -45,7 +45,7 @@ path = "../graphics"
[dependencies.glyphon]
version = "0.2"
git = "https://github.com/hecrj/glyphon.git"
rev = "cf7fe9df00499b868a6a94fa5fdb0a4ca368c9f9"
rev = "26f92369da3704988e3e27f0b35e705c6b2de203"
[dependencies.glam]
version = "0.24"

View file

@ -36,7 +36,16 @@ impl Pipeline {
.into_iter(),
)),
renderers: Vec::new(),
atlas: glyphon::TextAtlas::new(device, queue, format),
atlas: glyphon::TextAtlas::new(
device,
queue,
format,
if color::GAMMA_CORRECTION {
glyphon::ColorMode::Accurate
} else {
glyphon::ColorMode::Web
},
),
prepare_layer: 0,
measurement_cache: RefCell::new(Cache::new()),
render_cache: Cache::new(),