mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Added external camera feed from external plugin on Android
This commit is contained in:
parent
db66bd35af
commit
6f846eb5c5
21 changed files with 350 additions and 15 deletions
|
|
@ -189,6 +189,18 @@ RS::EnvironmentReflectionSource RendererEnvironmentStorage::environment_get_refl
|
|||
return env->reflection_source;
|
||||
}
|
||||
|
||||
void RendererEnvironmentStorage::environment_set_camera_feed_id(RID p_env, int p_camera_feed_id) {
|
||||
Environment *env = environment_owner.get_or_null(p_env);
|
||||
ERR_FAIL_NULL(env);
|
||||
env->camera_feed_id = p_camera_feed_id;
|
||||
}
|
||||
|
||||
int RendererEnvironmentStorage::environment_get_camera_feed_id(RID p_env) const {
|
||||
Environment *env = environment_owner.get_or_null(p_env);
|
||||
ERR_FAIL_NULL_V(env, -1);
|
||||
return env->camera_feed_id;
|
||||
}
|
||||
|
||||
// Tonemap
|
||||
|
||||
void RendererEnvironmentStorage::environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white) {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ private:
|
|||
float ambient_light_energy = 1.0;
|
||||
float ambient_sky_contribution = 1.0;
|
||||
RS::EnvironmentReflectionSource reflection_source = RS::ENV_REFLECTION_SOURCE_BG;
|
||||
int camera_feed_id = 0;
|
||||
|
||||
// Tonemap
|
||||
RS::EnvironmentToneMapper tone_mapper;
|
||||
|
|
@ -181,10 +182,8 @@ public:
|
|||
void environment_set_bg_energy(RID p_env, float p_multiplier, float p_exposure_value);
|
||||
void environment_set_canvas_max_layer(RID p_env, int p_max_layer);
|
||||
void environment_set_ambient_light(RID p_env, const Color &p_color, RS::EnvironmentAmbientSource p_ambient = RS::ENV_AMBIENT_SOURCE_BG, float p_energy = 1.0, float p_sky_contribution = 0.0, RS::EnvironmentReflectionSource p_reflection_source = RS::ENV_REFLECTION_SOURCE_BG);
|
||||
// FIXME: Disabled during Vulkan refactoring, should be ported.
|
||||
#if 0
|
||||
void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id);
|
||||
#endif
|
||||
int environment_get_camera_feed_id(RID p_env) const;
|
||||
|
||||
RS::EnvironmentBG environment_get_background(RID p_env) const;
|
||||
RID environment_get_sky(RID p_env) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue