EngineStreamingRestoreMemorySize: Difference between revisions
Jump to navigation
Jump to search
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
nil | nil engineStreamingRestoreMemorySize() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[EngineStreaming]]:restoreMemorySize||}} | {{OOP||[[EngineStreaming]]:restoreMemorySize||}} | ||
| Line 14: | Line 14: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler("rsms", function() | addCommandHandler("rsms", function() | ||
local prevMB = math.floor( | local prevMB = math.floor(engineStreamingGetMemorySize() / 1024 / 1024) | ||
engineStreamingRestoreMemorySize() | engineStreamingRestoreMemorySize() | ||
outputChatBox("The maximum streaming memory available has been restored to the original value of " .. math.floor(engineGetStreamingMemorySize() / 1024 / 1024) .. " MB [Was " .. prevMB .. " MB]") | |||
end, false, false) | end, false, false) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 21:58, 19 January 2026
Restores the maximum amount of RAM [in bytes] that can be used for streaming to the default value
| Tip: The function to manipulate the memory size is engineStreamingSetMemorySize |
Syntax
nil engineStreamingRestoreMemorySize()
OOP Syntax Help! I don't understand this!
- Method: EngineStreaming:restoreMemorySize(...)
Example
This example adds a command that can be used to change the streaming memory size, and display the previous value.
addCommandHandler("rsms", function()
local prevMB = math.floor(engineStreamingGetMemorySize() / 1024 / 1024)
engineStreamingRestoreMemorySize()
outputChatBox("The maximum streaming memory available has been restored to the original value of " .. math.floor(engineGetStreamingMemorySize() / 1024 / 1024) .. " MB [Was " .. prevMB .. " MB]")
end, false, false)
See Also
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFilesCount
- engineImageGetFiles
- engineImageGetFile
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIMG
- engineLoadIFP
- engineLoadTXD
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetUsedMemory