Not sure if it's linux specific or appears on other platforms but setting a default filter mode with set_default_filter_mode appears to do nothing
use macroquad::prelude::*;
use macroquad::miniquad::FilterMode;
#[macroquad::main("test")]
async fn main() {
let bytes = include_bytes!("multicolor-square.png");
let texture = Texture2D::from_file_with_format(bytes, None);
set_default_filter_mode(FilterMode::Nearest);
loop {
let params = DrawTextureParams {
dest_size: Some(texture.size() * 10.0),
..Default::default()
};
draw_texture_ex(&texture, 100.0, 100.0, WHITE, params);
next_frame().await
}
}
results in a blurry texture after scaling
meanwhile using texture.set_filter(FilterMode::Nearest); instead, does affect the filter mode so it seems to only be an issue with the global context somehow?
use macroquad::miniquad::FilterMode;
use macroquad::prelude::*;
#[macroquad::main("test")]
async fn main() {
let bytes = include_bytes!("multicolor-square.png");
let texture = Texture2D::from_file_with_format(bytes, None);
texture.set_filter(FilterMode::Nearest); // changed
loop {
let params = DrawTextureParams {
dest_size: Some(texture.size() * 10.0),
..Default::default()
};
draw_texture_ex(&texture, 100.0, 100.0, WHITE, params);
next_frame().await
}
}

Not sure if it's linux specific or appears on other platforms but setting a default filter mode with
set_default_filter_modeappears to do nothingresults in a blurry texture after scaling
meanwhile using
texture.set_filter(FilterMode::Nearest);instead, does affect the filter mode so it seems to only be an issue with the global context somehow?