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 2017-08-21 00:17:24 +10:00 committed by Bastiaan Olij
parent 0a3c21d999
commit 02ea99129e
67 changed files with 2384 additions and 5 deletions

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);
}