diff options
author | BastiaanOlij <mux213@gmail.com> | 2017-08-21 00:17:24 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2019-06-15 21:30:32 +1000 |
commit | 02ea99129e8f3882914431374c60a7d80c5146e1 (patch) | |
tree | 6e41adaa70a2d5a3441ba6c1d455d9b63ea8c1de /servers/register_server_types.cpp | |
parent | 0a3c21d999559617cc9cdfe261d631e6d1267374 (diff) | |
download | redot-engine-02ea99129e8f3882914431374c60a7d80c5146e1.tar.gz |
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 'servers/register_server_types.cpp')
-rw-r--r-- | servers/register_server_types.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index f3394019f5..f7cec6a378 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -54,6 +54,8 @@ #include "audio/effects/audio_effect_stereo_enhance.h" #include "audio/effects/audio_stream_generator.h" #include "audio_server.h" +#include "camera/camera_feed.h" +#include "camera_server.h" #include "core/script_debugger_remote.h" #include "physics/physics_server_sw.h" #include "physics_2d/physics_2d_server_sw.h" @@ -114,6 +116,7 @@ void register_server_types() { ClassDB::register_virtual_class<PhysicsServer>(); ClassDB::register_virtual_class<Physics2DServer>(); ClassDB::register_class<ARVRServer>(); + ClassDB::register_class<CameraServer>(); shader_types = memnew(ShaderTypes); @@ -169,6 +172,8 @@ void register_server_types() { ClassDB::register_virtual_class<AudioEffectSpectrumAnalyzerInstance>(); } + ClassDB::register_class<CameraFeed>(); + ClassDB::register_virtual_class<Physics2DDirectBodyState>(); ClassDB::register_virtual_class<Physics2DDirectSpaceState>(); ClassDB::register_virtual_class<Physics2DShapeQueryResult>(); @@ -208,4 +213,5 @@ void register_server_singletons() { Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer", PhysicsServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("Physics2DServer", Physics2DServer::get_singleton())); Engine::get_singleton()->add_singleton(Engine::Singleton("ARVRServer", ARVRServer::get_singleton())); + Engine::get_singleton()->add_singleton(Engine::Singleton("CameraServer", CameraServer::get_singleton())); } |