Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/client/StarRenderingLuaBindings.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-12-19 19:08:59 +1100
committerGitHub <noreply@github.com>2024-12-19 19:08:59 +1100
commit63903276e5e1c3f96629d87cdaab9e868368b343 (patch)
treee335b36c27fba80e56605b95e6fd3f4993bd6f58 /source/client/StarRenderingLuaBindings.cpp
parent2bf5be1af36fa53fc686bb893dc97e5ed10ddaa4 (diff)
parent300b8f2dbae631fdddeafaee683f450418e5cc57 (diff)
Merge pull request #157 from Bottinator22/main
Allow post process shaders to be grouped up and enabled/disabled via Lua or a shaders menu
Diffstat (limited to 'source/client/StarRenderingLuaBindings.cpp')
-rw-r--r--source/client/StarRenderingLuaBindings.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/client/StarRenderingLuaBindings.cpp b/source/client/StarRenderingLuaBindings.cpp
new file mode 100644
index 0000000..4c9e7a2
--- /dev/null
+++ b/source/client/StarRenderingLuaBindings.cpp
@@ -0,0 +1,21 @@
+#include "StarRenderingLuaBindings.hpp"
+#include "StarLuaConverters.hpp"
+#include "StarClientApplication.hpp"
+
+namespace Star {
+
+LuaCallbacks LuaBindings::makeRenderingCallbacks(ClientApplication* app) {
+ LuaCallbacks callbacks;
+
+ // if the last argument is defined and true, this change will also be saved to starbound.config and read on next game start, use for things such as an interface that does this
+ callbacks.registerCallbackWithSignature<void, String, bool, Maybe<bool>>("setPostProcessGroupEnabled", bind(mem_fn(&ClientApplication::setPostProcessGroupEnabled), app, _1, _2, _3));
+ callbacks.registerCallbackWithSignature<bool, String>("postProcessGroupEnabled", bind(mem_fn(&ClientApplication::postProcessGroupEnabled), app, _1));
+
+ // not entirely necessary (root.assetJson can achieve the same purpose) but may as well
+ callbacks.registerCallbackWithSignature<Json>("postProcessGroups", bind(mem_fn(&ClientApplication::postProcessGroups), app));
+
+ return callbacks;
+}
+
+
+}