Browse Source

egui_glow: allow empty (zero-sized) textures

See https://github.com/emilk/egui/issues/1960
pull/1971/head
Emil Ernerfeldt 2 years ago
parent
commit
d5933daee5
  1. 2
      crates/eframe/CHANGELOG.md
  2. 1
      crates/egui_glow/CHANGELOG.md
  3. 6
      crates/egui_glow/src/painter.rs

2
crates/eframe/CHANGELOG.md

@ -7,6 +7,8 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
## Unreleased
* Added `NativeOptions::event_loop_builder` hook for apps to change platform specific event loop options ([#1952](https://github.com/emilk/egui/pull/1952)).
* Enabled deferred render state initialization to support Android ([#1952](https://github.com/emilk/egui/pull/1952)).
* Allow empty textures with the glow renderer.
## 0.19.0 - 2022-08-20
* MSRV (Minimum Supported Rust Version) is now `1.61.0` ([#1846](https://github.com/emilk/egui/pull/1846)).

1
crates/egui_glow/CHANGELOG.md

@ -3,6 +3,7 @@ All notable changes to the `egui_glow` integration will be noted in this file.
## Unreleased
* Allow empty textures.
## 0.19.0 - 2022-08-20

6
crates/egui_glow/src/painter.rs

@ -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 {}",

Loading…
Cancel
Save