You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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:
committed by
Bastiaan Olij
parent
0a3c21d999
commit
02ea99129e
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user