|
SceneCleanup Method |
Cleanup method can perform various cleanup actions.
It can dispose the SceneNodes (and their meshes and materials) that were removed from the RootNode.
It can dispose GPU resources that were scheduled to be disposed after a frame has been rendered.
It can also check all memory blocks and free those that are empty
(if freeEmptyMemoryBlocks is true or when it empty for at least EngineRuntimeOptions.
FramesCountToReleaseEmptyMemoryBlock frames).
Namespace: Ab4d.SharpEngineAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax public void Cleanup(
bool disposeDisconnectedSceneNodes = false,
bool disposeMaterialsOnDisconnectedSceneNodes = false,
bool disposeMeshesOnDisconnectedSceneNodes = false,
bool cleanAllSceneCaches = false,
bool freeEmptyMemoryBlocks = true
)
Parameters
- disposeDisconnectedSceneNodes Boolean (Optional)
- when true (false by default) then the SceneNodes that were removed from the RootNode are disposed
- disposeMaterialsOnDisconnectedSceneNodes Boolean (Optional)
- when true (false by default) and when disposeDisconnectedSceneNodes is true, then the Materials that were assigned to SceneNode that were removed from the RootNode are disposed
- disposeMeshesOnDisconnectedSceneNodes Boolean (Optional)
- when true (false by default) and when disposeDisconnectedSceneNodes is true, then the Meshes that were assigned to SceneNode that were removed from the RootNode are disposed
- cleanAllSceneCaches Boolean (Optional)
- when true (false by default) then all scene caches are cleared
- freeEmptyMemoryBlocks Boolean (Optional)
- when true, the empty memory block is immediately freed; when false the empty memory block is freed if it is empty for at least EngineRuntimeOptions.FramesCountToReleaseEmptyMemoryBlock frames
See Also