updateCache is an internal function used for node implementation. This needs to handle 3 cases:
1. Renderer cache node is not created. Create the proper node and process/cache subtree, adding items into draw primitive (DP).
2. Render cache node created, but has no parent. This means cached node has been removed and is now being re-added. pParent, pRoot and other variables need to be initialized, DPs inserted.
3. Render node is created and is part of parent. In this case, we are verifying a child node of a subtree after an ancestor (ex, parent) was re-added. We don't need to do insert/remove, but we do need to update pRoot/Depth and insert DPs.
Parameters |
Description |
HAL* hal |
The renderer HAL. |
TreeCacheNode* pparent |
Pointer to the root/parent node. |
TreeCacheNode* pinsert |
Pointer to the node to be created/inserted into the parent. This can be null. |
TreeNode* pnode |
Pointer to the node to be updated. |
UInt16 depth |
The depth of the node. |
The updated cache node.