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

The destroy method of Custom Shader should be public #12444

Closed
anne-gropler opened this issue Jan 21, 2025 · 0 comments · Fixed by #12469
Closed

The destroy method of Custom Shader should be public #12444

anne-gropler opened this issue Jan 21, 2025 · 0 comments · Fixed by #12469

Comments

@anne-gropler
Copy link
Contributor

As stated by the CustomShader docs:

CustomShader#destroy must be called when the custom shader is no longer needed to clean up GPU resources properly. The application is responsible for calling this method.

However, the destroy method is not part of the public interface, which is especially troublesome when using typescript.

The current workaround in typescript is to annotate the customShader with as any:
(model.customShader as any).destroy();

I understand that the CustomShader is still experimental, but since the documentation is clear about destroy, I expected the API to reflect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants