Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mvvvv opened this issue Dec 31, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@mvvvv
Copy link

mvvvv commented Dec 31, 2023

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.

@maluoi
Copy link
Collaborator

maluoi commented Jan 2, 2024

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 maluoi added the bug Something isn't working label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants