Skip to content

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

Description

@RedImp1470

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions