mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
regl's destroy function destroys all resources created with it; so does GPUDevice::destroy.
This commit is contained in:
1
TODO.txt
1
TODO.txt
@@ -1,5 +1,4 @@
|
|||||||
TODO:
|
TODO:
|
||||||
Explicitly destroy what gets created
|
|
||||||
Create multiple distributions
|
Create multiple distributions
|
||||||
core
|
core
|
||||||
One embedded MSDF, combined from the two main glyph sets and their configs
|
One embedded MSDF, combined from the two main glyph sets and their configs
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ export const destroy = (rain) => {
|
|||||||
window.removeEventListener("dblclick", doubleClick);
|
window.removeEventListener("dblclick", doubleClick);
|
||||||
cache.clear();
|
cache.clear();
|
||||||
tick.cancel(); // stop RAF
|
tick.cancel(); // stop RAF
|
||||||
regl.destroy(); // release all GPU resources & event listeners
|
regl.destroy(); // releases all GPU resources & event listeners
|
||||||
rain.destroyed = true;
|
rain.destroyed = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -209,8 +209,7 @@ export const destroy = (rain) => {
|
|||||||
window.removeEventListener("dblclick", doubleClick);
|
window.removeEventListener("dblclick", doubleClick);
|
||||||
cache.clear();
|
cache.clear();
|
||||||
cancelAnimationFrame(renderLoop); // stop RAF
|
cancelAnimationFrame(renderLoop); // stop RAF
|
||||||
// TODO: destroy WebGPU resources
|
device.destroy(); // This also destroys any objects created with the device
|
||||||
device.destroy();
|
|
||||||
rain.destroyed = true;
|
rain.destroyed = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user