StereoKit icon indicating copy to clipboard operation
StereoKit copied to clipboard

tex_create_file_type creates a 0x0 size texture if the file doesn't exist

Open mvvvv opened this issue 1 year ago • 1 comments

Description

tex_create_file_type creates a 0x0 sized texture if the file doesn't exist. The log warns you about the problem : Texture file failed to load: textures/power.jpeg but do not return a null value.

As a consequence sprite_create creates an 0x0 sized sprite even though he controls whether the texture is null or not.

Platform / Environment

rust binding, ubuntu 23.10 gnome wayland.

mvvvv avatar Dec 31 '23 14:12 mvvvv

When a texture fails to load, it returns a valid predefined error texture! You can check the state of the texture for errors via tex_asset_state.

However, the sprite's behavior in this case sounds incorrect. The fix for this (on my end) should be to return a valid error sprite when provided with error textures.

maluoi avatar Jan 02 '24 22:01 maluoi