-
Notifications
You must be signed in to change notification settings - Fork 262
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
Suggestion to add examples with .removeX() / .dispose() #169
Comments
These methods mark items as unavailable as I understand (from the end-user perspective). Should the user track objects produced by TWGL manually, or maybe it makes sense to implement some general method to dispose of both WebGL raw data and TWGL objects? |
Since twgl is thin wrapper on vanilla webgl probably enough just an example, but I didn't look carefully. |
Most things are pretty straight forward.
Maybe it would be okay to add functions to do that. The problem is twgl doesn't know how you used them. you can do this
Similarly you can do this
But twgl has no way to track those things are being used twice so if delete functions are added you just have to be aware when you can't use them whereas creation has no such issues. |
Seems that we need an examples with textures, framebuffers etc.
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/deleteTexture
The text was updated successfully, but these errors were encountered: