StereoKit
StereoKit copied to clipboard
tex_create_file_type creates a 0x0 size texture if the file doesn't exist
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.
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.