three-d icon indicating copy to clipboard operation
three-d copied to clipboard

Upgrading V0.16.1 => V0.17 breaks loading a 1x1 pixel white texture

Open miwarnec opened this issue 1 year ago • 2 comments

Hey there! Super excited to try the new updated, since it fixes the egui destroy bug.

Updated three-d from 0.16.1 to 0.17 while also having to update three-d-asset from 0.6 to 0.7.

However, there seems to be a regression now. I have a 1x1 white pixel texture that I use in a low resolution Pong demo, uploaded here (it's tiny, zoom in): ball

After upgrading to 0.18, when attempting to load the texture I am getting:

15:29:17 [ERROR] GL error, at /.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui_glow-0.26.2/src/painter.rs:143 (before Painter::new): GL_INVALID_VALUE (0x501). Please file a bug at https://github.com/emilk/egui/issues
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable

miwarnec avatar Mar 13 '24 15:03 miwarnec

Thanks for reporting, I'll try to find some time to fix it. In the meantime, a 2x2 texture should work, I hope.

asny avatar May 05 '24 12:05 asny

Hey @asny yes indeed, other textures work. Slightly concerning nonetheless - for example: which other resolutions may not work either?

miwarnec avatar Jun 26 '24 16:06 miwarnec

It's a special case with 1x1 pixel textures. Fixed in https://github.com/asny/three-d/commit/39eac7f3cd42e79b8c32a7f172aebfbc882fa08e

asny avatar Aug 20 '24 09:08 asny