mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-25 00:18:41 -06:00
use nearest filter
This commit is contained in:
parent
f47bfc1f48
commit
f514746ecc
|
@ -1,13 +1,12 @@
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use glam::Vec2;
|
use glam::Vec2;
|
||||||
use glium::{
|
use glium::{
|
||||||
Surface, DrawParameters, Blend,
|
Blend, DrawParameters, IndexBuffer, Program, Surface, VertexBuffer,
|
||||||
Program, VertexBuffer, IndexBuffer,
|
implement_vertex, uniform,
|
||||||
backend::{Facade, Context},
|
backend::{Context, Facade},
|
||||||
texture::{Texture2d, RawImage2d},
|
|
||||||
index::PrimitiveType,
|
index::PrimitiveType,
|
||||||
implement_vertex,
|
texture::{RawImage2d, Texture2d},
|
||||||
uniform, uniforms::{Sampler, SamplerBehavior, SamplerWrapFunction},
|
uniforms::{MagnifySamplerFilter, MinifySamplerFilter, Sampler, SamplerBehavior, SamplerWrapFunction},
|
||||||
};
|
};
|
||||||
use hui::{
|
use hui::{
|
||||||
draw::{TextureAtlasMeta, UiDrawCall, UiVertex}, UiInstance
|
draw::{TextureAtlasMeta, UiDrawCall, UiVertex}, UiInstance
|
||||||
|
@ -182,6 +181,9 @@ impl GliumUiRenderer {
|
||||||
&uniform! {
|
&uniform! {
|
||||||
resolution: resolution.to_array(),
|
resolution: resolution.to_array(),
|
||||||
tex: Sampler(self.ui_texture.as_ref().unwrap(), SamplerBehavior {
|
tex: Sampler(self.ui_texture.as_ref().unwrap(), SamplerBehavior {
|
||||||
|
max_anisotropy: 1,
|
||||||
|
magnify_filter: MagnifySamplerFilter::Nearest,
|
||||||
|
minify_filter: MinifySamplerFilter::NearestMipmapNearest,
|
||||||
wrap_function: (SamplerWrapFunction::Clamp, SamplerWrapFunction::Clamp, SamplerWrapFunction::Clamp),
|
wrap_function: (SamplerWrapFunction::Clamp, SamplerWrapFunction::Clamp, SamplerWrapFunction::Clamp),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue