MTA:Eir/functions/engineGetStreamingInfo: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{*Client_function}} | |||
__NOTOC__ | __NOTOC__ | ||
This function returns a dictionary which is a snapshot of the current [[GTA:SA_Resource_Streaming|GTA:SA Streaming System status]]. Since the streaming status changes rapidly every frame, it is recommended to draw it on the screen. | This function returns a dictionary which is a snapshot of the current [[GTA:SA_Resource_Streaming|GTA:SA Streaming System status]]. Since the streaming status changes rapidly every frame, it is recommended to draw it on the screen. | ||
Revision as of 01:58, 12 January 2014
This function returns a dictionary which is a snapshot of the current GTA:SA Streaming System status. Since the streaming status changes rapidly every frame, it is recommended to draw it on the screen.
{
usedMemory = 40985576,
maxMemory = 533725184,
numberOfRequests = 0,
numberOfPriorityRequests = 0,
numberOfSlicers = 2,
numberOfRequestsPerSlicer = 16,
activeStreamingThread = 0,
isBusy = false,
isLoadingBigModel = false
}
Syntax
table engineGetStreamingInfo ()
Returns
Returns a dictionary holding the Streaming system status.
Example
Click to collapse [-]
ClientThis snippet draws the engine streaming information on the screen.
local streamingEntryNames =
{
"usedMemory", "maxMemory", "numberOfRequests",
"numberOfPriorityRequests", "numberOfSlicers",
"numberOfRequestsPerSlicer", "activeStreamingThread",
"isBusy", "isLoadingBigModel"
};
local screenWidth, screenHeight = guiGetScreenSize();
addEventHandler( "onClientRender", root,
function()
local streamingInfo = engineGetStreamingInfo();
local x, y = screenWidth - 200, 300;
for m,n in ipairs(streamingEntryNames) do
local entry = streamingInfo[n];
if not ( entry == nil ) then
dxDrawText( n .. ": " .. tostring( entry ), x, y );
end
y = y + 20;
end
end
);