mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 11:31:59 +08:00
8402289d77
* Add extra steps to the destroy functions to update the cached resources. This will make sure that the resources in device.stateCache is valid. * unbind a resource before destroying it * remove unnecessary non-null assertion * update the state after the destruction to make the process robust * fix the bugs introduced in PR9854. bug: forgot to update the active texUnit in stateCache. * reduce the use of dot operator to improve performance. * fix the bug introduced in the previous commit * reduce the use of dot operator to improve performance