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.
This commit is contained in:
BastiaanOlij authored and Bastiaan Olij committed 2019-06-15 21:30:32 +10:00
1 parent 0a3c21d999
commit 02ea99129e
67 files changed
+2384 -5

No files matched your search

+3
View File
@@ -942,6 +942,8 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
VisualServer *visual_server = memnew(VisualServerRaster());
input = memnew(InputDefault);
camera_server = memnew(CameraServer);
EMSCRIPTEN_RESULT result;
#define EM_CHECK(ev) \
if (result != EMSCRIPTEN_RESULT_SUCCESS) \
@@ -1076,6 +1078,7 @@ void OS_JavaScript::delete_main_loop() {
void OS_JavaScript::finalize() {
memdelete(camera_server);
memdelete(input);
}