MTA:Eir/functions/engineStreamingSetGCOnDemandEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{*Client_function}}
__NOTOC__  
__NOTOC__  
This function is used to add a [[GTA:SA_Streaming_Garbage_Collection|Streaming garbage collector]] run to the event that the engine runs out of freely available Streaming GC nodes. The whole world is checked for off-screen or far-away entities. Every entity it finds loses its RenderWare data. When the model info of the specific entity model is not used anymore, it is freed. This way multiple Streaming GC nodes are made available for allocation. It is a safer way to free nodes from in-game entities than the Streaming node stealing implemented by Rockstar Games.
This function is used to add a [[GTA:SA_Streaming_Garbage_Collection|Streaming garbage collector]] run to the event that the engine runs out of freely available Streaming GC nodes. The whole world is checked for off-screen or far-away entities. Every entity it finds loses its RenderWare data. When the model info of the specific entity model is not used anymore, it is freed. This way multiple Streaming GC nodes are made available for allocation. It is a safer way to free nodes from in-game entities than the Streaming node stealing implemented by Rockstar Games.

Revision as of 01:58, 12 January 2014

Template:*Client function

This function is used to add a Streaming garbage collector run to the event that the engine runs out of freely available Streaming GC nodes. The whole world is checked for off-screen or far-away entities. Every entity it finds loses its RenderWare data. When the model info of the specific entity model is not used anymore, it is freed. This way multiple Streaming GC nodes are made available for allocation. It is a safer way to free nodes from in-game entities than the Streaming node stealing implemented by Rockstar Games.

By default, Streaming GC on demand is disabled.

Syntax

bool engineStreamingSetGCOnDemandEnabled ( bool enabled )

Arguments

  • enabled: a boolean to decide whether to garbage collect on lacking free Streaming GC nodes

Returns

Returns true if enabled is passed as valid boolean, false otherwise.

Example

Click to collapse [-]
Client

This snippet sets the Streaming GC system to sparse mode. In this mode only the preallocated amount of Streaming GC nodes is allowed. Keeping a low amount of Streaming nodes is interesting for performance optimizations.

engineStreamingSetGCOnDemandEnabled( true );
engineSetInfiniteStreamingEnabled( false );
engineSetStrictNodeDistributionEnabled( true );