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

Textures that are used as uniform variable value in a ShaderEffect don't get disposed with the ShaderEffect #867

Open
RedImp1470 opened this issue Mar 7, 2024 · 0 comments
Labels

Comments

@RedImp1470
Copy link
Member

FUSEE v0.13.0

Textures that are used in a ShaderEffect are kept alive by the TextureManager, even if the correpsonding ShaderEffect is already disposed.
Textures are registered in the TextureManager on creation. From then on, the TextureManager holds a reference to the Texture object.
But there is no connection from the ShaderEffect/EffectManager to the TextureManager. Therefore the TextureManager will keep the reference to the texture indefinitely.
A workaround is to manually delete the Texture when we know that the ShaderEffect is no longer needed. However, this isn't ideal or user-expected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant