summaryrefslogtreecommitdiff
path: root/platform/uwp/os_uwp.cpp
diff options
context:
space:
mode:
authorBastiaanOlij <mux213@gmail.com>2017-08-21 00:17:24 +1000
committerBastiaan Olij <mux213@gmail.com>2019-06-15 21:30:32 +1000
commit02ea99129e8f3882914431374c60a7d80c5146e1 (patch)
tree6e41adaa70a2d5a3441ba6c1d455d9b63ea8c1de /platform/uwp/os_uwp.cpp
parent0a3c21d999559617cc9cdfe261d631e6d1267374 (diff)
Adding a new Camera Server implementation to Godot.
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server. Other parts of Godot can interact with this to obtain images from the camera as textures. This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
Diffstat (limited to 'platform/uwp/os_uwp.cpp')
-rw-r--r--platform/uwp/os_uwp.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index f9d22481dd..9d9be44ce5 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -302,6 +302,10 @@ Error OS_UWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
}
visual_server->init();
+
+ ///@TODO implement a subclass for UWP and instantiate that instead
+ camera_server = memnew(CameraServer);
+
input = memnew(InputDefault);
joypad = ref new JoypadUWP(input);
@@ -400,6 +404,8 @@ void OS_UWP::finalize() {
memdelete(input);
+ memdelete(camera_server);
+
joypad = nullptr;
}