egui_glow: allow empty (zero-sized) textures
See https://github.com/emilk/egui/issues/1960
This commit is contained in:
parent
fb92434aac
commit
d5933daee5
3 changed files with 3 additions and 6 deletions
|
@ -7,6 +7,8 @@ NOTE: [`egui-winit`](../egui-winit/CHANGELOG.md), [`egui_glium`](../egui_glium/C
|
||||||
## Unreleased
|
## Unreleased
|
||||||
* Added `NativeOptions::event_loop_builder` hook for apps to change platform specific event loop options ([#1952](https://github.com/emilk/egui/pull/1952)).
|
* 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)).
|
* 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
|
## 0.19.0 - 2022-08-20
|
||||||
* MSRV (Minimum Supported Rust Version) is now `1.61.0` ([#1846](https://github.com/emilk/egui/pull/1846)).
|
* MSRV (Minimum Supported Rust Version) is now `1.61.0` ([#1846](https://github.com/emilk/egui/pull/1846)).
|
||||||
|
|
|
@ -3,6 +3,7 @@ All notable changes to the `egui_glow` integration will be noted in this file.
|
||||||
|
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
* Allow empty textures.
|
||||||
|
|
||||||
|
|
||||||
## 0.19.0 - 2022-08-20
|
## 0.19.0 - 2022-08-20
|
||||||
|
|
|
@ -552,12 +552,6 @@ impl Painter {
|
||||||
data: &[u8],
|
data: &[u8],
|
||||||
) {
|
) {
|
||||||
assert_eq!(data.len(), w * h * 4);
|
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!(
|
assert!(
|
||||||
w <= self.max_texture_side && h <= self.max_texture_side,
|
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 {}",
|
"Got a texture image of size {}x{}, but the maximum supported texture side is only {}",
|
||||||
|
|
Loading…
Reference in a new issue