MTA:Eir/functions/engineStreamingIsFiberedLoadingEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ This function returns whether the GTA:SA Streaming system is in original or fibered mode. In original mode, most resources are loaded in ...")
 
mNo edit summary
Line 1: Line 1:
{{*Client_function}}
__NOTOC__  
__NOTOC__  
This function returns whether the [[GTA:SA_Resource_Streaming|GTA:SA Streaming system]] is in original or fibered mode. In original mode, most resources are loaded in one go, but big ones (exceeding slicer buffer size) are loaded exclusively and in two pulses. In fibered mode, the Streaming system can only take a user-defined percentage of the game frame time, meaning that resources can take an arbitrary amount of pulses depending on the complexity of said resources.
This function returns whether the [[GTA:SA_Resource_Streaming|GTA:SA Streaming system]] is in original or fibered mode. In original mode, most resources are loaded in one go, but big ones (exceeding slicer buffer size) are loaded exclusively and in two pulses. In fibered mode, the Streaming system can only take a user-defined percentage of the game frame time, meaning that resources can take an arbitrary amount of pulses depending on the complexity of said resources.

Revision as of 01:59, 12 January 2014

Template:*Client function

This function returns whether the GTA:SA Streaming system is in original or fibered mode. In original mode, most resources are loaded in one go, but big ones (exceeding slicer buffer size) are loaded exclusively and in two pulses. In fibered mode, the Streaming system can only take a user-defined percentage of the game frame time, meaning that resources can take an arbitrary amount of pulses depending on the complexity of said resources.

By default, fibered loading is enabled.

Syntax

bool engineStreamingIsFiberedLoadingEnabled ()

Returns

Returns true if fibered loading is enabled, false otherwise.

Example

Click to collapse [-]
Client

This snippet draws on the screen whether fibered loading is enabled or not.

addEventHandler( "onClientRender", root,
    function()
        local isEnabled = engineStreamingIsFiberedLoadingEnabled();

        dxDrawText( "Streaming Mode: " .. ( isEnabled and "fibered loading" or "single execution" ), 100, 400 );
    end
);