1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

egui_glow: allow empty (zero-sized) textures

See https://github.com/emilk/egui/issues/1960
This commit is contained in:
Emil Ernerfeldt
2022-08-24 14:34:34 +02:00
parent fb92434aac
commit d5933daee5
3 changed files with 3 additions and 6 deletions

View File

@@ -552,12 +552,6 @@ impl Painter {
data: &[u8],
) {
assert_eq!(data.len(), w * h * 4);
assert!(
w >= 1 && h >= 1,
"Got a texture image of size {}x{}. A texture must at least be one texel wide.",
w,
h
);
assert!(
w <= self.max_texture_side && h <= self.max_texture_side,
"Got a texture image of size {}x{}, but the maximum supported texture side is only {}",