Click or drag to resize
Ab4d.SharpEngine logo

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.SharpEngine
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
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
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Scene.Cleanup(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean)"]

See Also