MTA:Eir/functions/engineGetStreamingInfo: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ This function returns a dictionary which is a snapshot of the current GTA:SA Streaming System status. Since the streaming status changes ...") |
(No difference)
|
Revision as of 05:46, 11 December 2013
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 engineGetGamePoolLimits ()
Returns
Returns a table holding internal engine pool limit info.
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
);