From 624c7aaaf192f2e87081a241123a8507a4718ba3 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Thu, 29 Jun 2023 10:11:19 +1000 Subject: Move lighting calculation to separate thread --- source/frontend/StarClientCommandProcessor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/frontend/StarClientCommandProcessor.cpp') diff --git a/source/frontend/StarClientCommandProcessor.cpp b/source/frontend/StarClientCommandProcessor.cpp index f006d8e..b6ab53c 100644 --- a/source/frontend/StarClientCommandProcessor.cpp +++ b/source/frontend/StarClientCommandProcessor.cpp @@ -24,6 +24,7 @@ ClientCommandProcessor::ClientCommandProcessor(UniverseClientPtr universeClient, {"debug", bind(&ClientCommandProcessor::debug, this)}, {"boxes", bind(&ClientCommandProcessor::boxes, this)}, {"fullbright", bind(&ClientCommandProcessor::fullbright, this)}, + {"asyncLighting", bind(&ClientCommandProcessor::asyncLighting, this)}, {"setGravity", bind(&ClientCommandProcessor::setGravity, this, _1)}, {"resetGravity", bind(&ClientCommandProcessor::resetGravity, this)}, {"fixedCamera", bind(&ClientCommandProcessor::fixedCamera, this)}, @@ -151,6 +152,12 @@ String ClientCommandProcessor::fullbright() { ? "enabled" : "disabled"); } +String ClientCommandProcessor::asyncLighting() { + return strf("Asynchronous render lighting {}", + m_universeClient->worldClient()->toggleAsyncLighting() + ? "enabled" : "disabled"); +} + String ClientCommandProcessor::setGravity(StringList const& arguments) { if (!adminCommandAllowed()) return "You must be an admin to use this command."; -- cgit v1.2.3