-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
add dispose() to BufferAttribute #15261
Comments
Can you please explain your use case a bit? How does your workflow look like? |
@Mugen87 i am developing a GIS system like goole earth web and i need to render the whole earth with DOM and DEM. the earth is renderd through dynamic tiles which are subdivided autometically base on the camera distance. tiles are cached, every frame the tile manager pick some free tiles, set the buffer attribute, construct meshes(meshes are also cached) and then add the meshes to the threejs scene. after the render process, the tile manager remove the meshes from threejs scene and mark the tiles used as free tiles again. in a word. meshes , buffer geometries and buffer attributes are separated objects for the system. the system know how to dispose all of them. buffer attributes and index buffers are shared between buffer geometries. so, i need a dispose method of buffer attribute. just like the Texture.dispose() of material. |
I think that sounds reasonable. |
Closing, see #17063 (comment). |
is it possible to add a dispose() method to BufferAttribute?
i need to dispose buffer attribute directly, not through the buffer geometry.
so i will change BufferAttribute and WebGLAttributes a bit, but i am not sure whether i am right.
i will change like this:
1.Make BufferAttribute as a sub classs of EventDispatcher to dispatch the dispose event
2.Handle dispose event in WebGLAttributes
am i right? thank you !
Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: