mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 13:38:35 +00:00
allocate texture data vec with room for 3 bytes per pixel
This commit is contained in:
parent
5d771a83b8
commit
67f7f11363
@ -129,7 +129,7 @@ impl TexturesUi {
|
||||
const WIDTH: usize = 100;
|
||||
const HEIGHT: usize = 100;
|
||||
|
||||
let mut data = Vec::with_capacity(WIDTH * HEIGHT);
|
||||
let mut data = Vec::with_capacity(WIDTH * HEIGHT * 3);
|
||||
for i in 0..WIDTH {
|
||||
for j in 0..HEIGHT {
|
||||
// Insert RGB values
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user