autoDetectApplyGraphicsQuality
Definition
-- @/lua/ge/extensions/core/settings/graphic.lua:1214
local function autoDetectApplyGraphicsQuality()
--
-- TODO(AK) 15/08/2021: RE-Enable after Porting TS startup to LUA
-- RE-Enable after Porting TS startup to LUA
-- RE-Enable after Porting TS startup to LUA
-- RE-Enable after Porting TS startup to LUA
-- RE-Enable after Porting TS startup to LUA
-- RE-Enable after Porting TS startup to LUA
-- RE-Enable after Porting TS startup to LUA
--
-- TorqueScriptLua.setVar('$pref::Video::autoDetect', false)
-- local intel = string.find(string.upper(getDisplayDeviceInformation()), "INTEL") ~= nil
-- local videoMem = GFXDevice.getVideoMemoryMB()
-- if videoMem == 0 then
-- log('E','graphic', "Unable to detect available video memory. Applying 'Normal' quality.");
-- videoMem = 500
-- end
-- if videoMem > 1000 then
-- graphicsOptions.GraphicMeshQuality.set("High")
-- graphicsOptions.GraphicTextureQuality.set("High")
-- graphicsOptions.GraphicLightingQuality.set("High")
-- graphicsOptions.GraphicShaderQuality.set("High")
-- TorqueScriptLua.call('PostFXManager::settingsApplyHighPreset')
-- graphicsOptions.GraphicPostfxQuality.set(3)
-- elseif videoMem >= 500 then
-- graphicsOptions.GraphicMeshQuality.set("Normal")
-- graphicsOptions.GraphicTextureQuality.set("Normal")
-- graphicsOptions.GraphicLightingQuality.set("Normal")
-- graphicsOptions.GraphicShaderQuality.set("Normal")
-- TorqueScriptLua.call('PostFXManager::settingsApplyNormalPreset')
-- graphicsOptions.GraphicPostfxQuality.set(2)
-- elseif videoMem > 250 then
-- graphicsOptions.GraphicMeshQuality.set("Low")
-- graphicsOptions.GraphicTextureQuality.set("Low")
-- graphicsOptions.GraphicLightingQuality.set("Low")
-- graphicsOptions.GraphicShaderQuality.set("Low")
-- TorqueScriptLua.call('PostFXManager::settingsApplyLowPreset')
-- graphicsOptions.GraphicPostfxQuality.set(1)
-- else
-- graphicsOptions.GraphicMeshQuality.set("Lowest")
-- graphicsOptions.GraphicTextureQuality.set("Lowest")
-- graphicsOptions.GraphicLightingQuality.set("Lowest")
-- graphicsOptions.GraphicShaderQuality.set("Lowest")
-- TorqueScriptLua.call('PostFXManager::settingsApplyLowestPreset')
-- graphicsOptions.GraphicPostfxQuality.set(0)
-- end
end
Callers
@/lua/ge/client/canvas.lua
if getConsoleVariable("$pref::Video::autoDetect") then
core_settings_graphic.autoDetectApplyGraphicsQuality()
end