mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-25 08:28:42 -06:00
Use non-srgb textures
This commit is contained in:
parent
1ac9f4abd0
commit
af138760c9
|
@ -4,7 +4,7 @@ use glium::{
|
||||||
Surface, DrawParameters, Blend,
|
Surface, DrawParameters, Blend,
|
||||||
Program, VertexBuffer, IndexBuffer,
|
Program, VertexBuffer, IndexBuffer,
|
||||||
backend::{Facade, Context},
|
backend::{Facade, Context},
|
||||||
texture::{SrgbTexture2d, RawImage2d},
|
texture::{Texture2d, RawImage2d},
|
||||||
index::PrimitiveType,
|
index::PrimitiveType,
|
||||||
implement_vertex,
|
implement_vertex,
|
||||||
uniform, uniforms::{Sampler, SamplerBehavior, SamplerWrapFunction},
|
uniform, uniforms::{Sampler, SamplerBehavior, SamplerWrapFunction},
|
||||||
|
@ -115,7 +115,7 @@ impl BufferPair {
|
||||||
pub struct GliumUiRenderer {
|
pub struct GliumUiRenderer {
|
||||||
context: Rc<Context>,
|
context: Rc<Context>,
|
||||||
program: glium::Program,
|
program: glium::Program,
|
||||||
ui_texture: Option<SrgbTexture2d>,
|
ui_texture: Option<Texture2d>,
|
||||||
buffer_pair: Option<BufferPair>,
|
buffer_pair: Option<BufferPair>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ impl GliumUiRenderer {
|
||||||
|
|
||||||
fn update_texture_atlas(&mut self, atlas: &TextureAtlasMeta) {
|
fn update_texture_atlas(&mut self, atlas: &TextureAtlasMeta) {
|
||||||
log::trace!("updating ui atlas texture");
|
log::trace!("updating ui atlas texture");
|
||||||
self.ui_texture = Some(SrgbTexture2d::new(
|
self.ui_texture = Some(Texture2d::new(
|
||||||
&self.context,
|
&self.context,
|
||||||
RawImage2d::from_raw_rgba(
|
RawImage2d::from_raw_rgba(
|
||||||
atlas.data.to_owned(),
|
atlas.data.to_owned(),
|
||||||
|
|
Loading…
Reference in a new issue