2017-06-09 05:23:50 +02:00
|
|
|
/*************************************************************************/
|
2020-03-28 13:19:05 +01:00
|
|
|
/* rendering_server_wrap_mt.h */
|
2017-06-09 05:23:50 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* This file is part of: */
|
|
|
|
/* GODOT ENGINE */
|
2017-08-27 14:16:55 +02:00
|
|
|
/* https://godotengine.org */
|
2017-06-09 05:23:50 +02:00
|
|
|
/*************************************************************************/
|
2020-01-01 11:16:22 +01:00
|
|
|
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
|
|
|
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
2017-06-09 05:23:50 +02:00
|
|
|
/* */
|
|
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
|
|
/* a copy of this software and associated documentation files (the */
|
|
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
|
|
/* the following conditions: */
|
|
|
|
/* */
|
|
|
|
/* The above copyright notice and this permission notice shall be */
|
|
|
|
/* included in all copies or substantial portions of the Software. */
|
|
|
|
/* */
|
|
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
|
|
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
|
|
/*************************************************************************/
|
2018-01-05 00:50:27 +01:00
|
|
|
|
2020-03-27 19:21:27 +01:00
|
|
|
#ifndef RENDERING_SERVER_WRAP_MT_H
|
|
|
|
#define RENDERING_SERVER_WRAP_MT_H
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2018-09-11 18:13:45 +02:00
|
|
|
#include "core/command_queue_mt.h"
|
|
|
|
#include "core/os/thread.h"
|
2020-03-27 19:21:27 +01:00
|
|
|
#include "servers/rendering_server.h"
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-03-27 19:21:27 +01:00
|
|
|
class RenderingServerWrapMT : public RenderingServer {
|
2017-06-09 05:23:50 +02:00
|
|
|
// the real visual server
|
2020-03-27 19:21:27 +01:00
|
|
|
mutable RenderingServer *rendering_server;
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
mutable CommandQueueMT command_queue;
|
|
|
|
|
|
|
|
static void _thread_callback(void *_instance);
|
|
|
|
void thread_loop();
|
|
|
|
|
|
|
|
Thread::ID server_thread;
|
|
|
|
volatile bool exit;
|
|
|
|
Thread *thread;
|
|
|
|
volatile bool draw_thread_up;
|
|
|
|
bool create_thread;
|
|
|
|
|
2017-10-07 00:24:23 +02:00
|
|
|
uint64_t draw_pending;
|
2018-05-09 08:11:43 +02:00
|
|
|
void thread_draw(bool p_swap_buffers, double frame_step);
|
2017-06-09 05:23:50 +02:00
|
|
|
void thread_flush();
|
|
|
|
|
|
|
|
void thread_exit();
|
|
|
|
|
2020-02-26 11:28:13 +01:00
|
|
|
Mutex alloc_mutex;
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
int pool_max_size;
|
|
|
|
|
2017-12-06 21:36:34 +01:00
|
|
|
//#define DEBUG_SYNC
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-03-27 19:21:27 +01:00
|
|
|
static RenderingServerWrapMT *singleton_mt;
|
2017-12-16 21:09:25 +01:00
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
#ifdef DEBUG_SYNC
|
|
|
|
#define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__));
|
|
|
|
#else
|
|
|
|
#define SYNC_DEBUG
|
|
|
|
#endif
|
|
|
|
|
|
|
|
public:
|
2020-03-27 19:21:27 +01:00
|
|
|
#define ServerName RenderingServer
|
|
|
|
#define ServerNameWrapMT RenderingServerWrapMT
|
|
|
|
#define server_name rendering_server
|
2017-06-09 05:23:50 +02:00
|
|
|
#include "servers/server_wrap_mt_common.h"
|
|
|
|
|
2019-06-11 20:43:37 +02:00
|
|
|
//these go pass-through, as they can be called from any thread
|
2020-03-27 19:21:27 +01:00
|
|
|
virtual RID texture_2d_create(const Ref<Image> &p_image) { return rendering_server->texture_2d_create(p_image); }
|
|
|
|
virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, TextureLayeredType p_layered_type) { return rendering_server->texture_2d_layered_create(p_layers, p_layered_type); }
|
2020-09-09 17:40:51 +02:00
|
|
|
virtual RID texture_3d_create(Image::Format p_format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector<Ref<Image>> &p_data) { return rendering_server->texture_3d_create(p_format, p_width, p_height, p_depth, p_mipmaps, p_data); }
|
2020-03-27 19:21:27 +01:00
|
|
|
virtual RID texture_proxy_create(RID p_base) { return rendering_server->texture_proxy_create(p_base); }
|
2019-06-11 20:43:37 +02:00
|
|
|
|
|
|
|
//goes pass-through
|
2020-03-27 19:21:27 +01:00
|
|
|
virtual void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) { rendering_server->texture_2d_update_immediate(p_texture, p_image, p_layer); }
|
2019-06-11 20:43:37 +02:00
|
|
|
//these go through command queue if they are in another thread
|
|
|
|
FUNC3(texture_2d_update, RID, const Ref<Image> &, int)
|
2020-09-09 17:40:51 +02:00
|
|
|
FUNC2(texture_3d_update, RID, const Vector<Ref<Image>> &)
|
2019-06-24 21:13:06 +02:00
|
|
|
FUNC2(texture_proxy_update, RID, RID)
|
2019-06-11 20:43:37 +02:00
|
|
|
|
|
|
|
//these also go pass-through
|
2020-03-27 19:21:27 +01:00
|
|
|
virtual RID texture_2d_placeholder_create() { return rendering_server->texture_2d_placeholder_create(); }
|
2020-05-01 14:34:23 +02:00
|
|
|
virtual RID texture_2d_layered_placeholder_create(TextureLayeredType p_type) { return rendering_server->texture_2d_layered_placeholder_create(p_type); }
|
2020-03-27 19:21:27 +01:00
|
|
|
virtual RID texture_3d_placeholder_create() { return rendering_server->texture_3d_placeholder_create(); }
|
2019-06-11 20:43:37 +02:00
|
|
|
|
|
|
|
FUNC1RC(Ref<Image>, texture_2d_get, RID)
|
|
|
|
FUNC2RC(Ref<Image>, texture_2d_layer_get, RID, int)
|
2020-09-09 17:40:51 +02:00
|
|
|
FUNC1RC(Vector<Ref<Image>>, texture_3d_get, RID)
|
2019-06-11 20:43:37 +02:00
|
|
|
|
|
|
|
FUNC2(texture_replace, RID, RID)
|
|
|
|
|
|
|
|
FUNC3(texture_set_size_override, RID, int, int)
|
|
|
|
// FIXME: Disabled during Vulkan refactoring, should be ported.
|
|
|
|
#if 0
|
2017-08-20 16:17:24 +02:00
|
|
|
FUNC2(texture_bind, RID, uint32_t)
|
2019-06-11 20:43:37 +02:00
|
|
|
#endif
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC3(texture_set_detect_3d_callback, RID, TextureDetectCallback, void *)
|
2017-06-17 02:47:28 +02:00
|
|
|
FUNC3(texture_set_detect_normal_callback, RID, TextureDetectCallback, void *)
|
2019-06-11 20:43:37 +02:00
|
|
|
FUNC3(texture_set_detect_roughness_callback, RID, TextureDetectRoughnessCallback, void *)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(texture_set_path, RID, const String &)
|
|
|
|
FUNC1RC(String, texture_get_path, RID)
|
2020-01-13 00:22:54 +01:00
|
|
|
FUNC1S(texture_debug_usage, List<TextureInfo> *)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2018-07-16 16:43:26 +02:00
|
|
|
FUNC2(texture_set_force_redraw_if_visible, RID, bool)
|
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
/* SHADER API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(shader)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(shader_set_code, RID, const String &)
|
|
|
|
FUNC1RC(String, shader_get_code, RID)
|
|
|
|
|
2017-06-17 16:03:48 +02:00
|
|
|
FUNC2SC(shader_get_param_list, RID, List<PropertyInfo> *)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC3(shader_set_default_texture_param, RID, const StringName &, RID)
|
|
|
|
FUNC2RC(RID, shader_get_default_texture_param, RID, const StringName &)
|
2019-07-12 15:12:48 +02:00
|
|
|
FUNC2RC(Variant, shader_get_param_default, RID, const StringName &)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
/* COMMON MATERIAL API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(material)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(material_set_shader, RID, RID)
|
|
|
|
|
|
|
|
FUNC3(material_set_param, RID, const StringName &, const Variant &)
|
|
|
|
FUNC2RC(Variant, material_get_param, RID, const StringName &)
|
|
|
|
|
2017-09-01 17:56:52 +02:00
|
|
|
FUNC2(material_set_render_priority, RID, int)
|
2017-07-08 17:34:05 +02:00
|
|
|
FUNC2(material_set_next_pass, RID, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
/* MESH API */
|
|
|
|
|
2019-08-19 00:40:52 +02:00
|
|
|
virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces) {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->mesh_create_from_surfaces(p_surfaces);
|
2019-08-19 00:40:52 +02:00
|
|
|
}
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(mesh)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2019-08-19 00:40:52 +02:00
|
|
|
FUNC2(mesh_add_surface, RID, const SurfaceData &)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC1RC(int, mesh_get_blend_shape_count, RID)
|
|
|
|
|
|
|
|
FUNC2(mesh_set_blend_shape_mode, RID, BlendShapeMode)
|
|
|
|
FUNC1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID)
|
|
|
|
|
2020-02-17 22:06:54 +01:00
|
|
|
FUNC4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &)
|
2017-11-14 21:25:42 +01:00
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3(mesh_surface_set_material, RID, int, RID)
|
|
|
|
FUNC2RC(RID, mesh_surface_get_material, RID, int)
|
|
|
|
|
2019-08-19 00:40:52 +02:00
|
|
|
FUNC2RC(SurfaceData, mesh_get_surface, RID, int)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC1RC(int, mesh_get_surface_count, RID)
|
|
|
|
|
2017-11-17 03:09:00 +01:00
|
|
|
FUNC2(mesh_set_custom_aabb, RID, const AABB &)
|
|
|
|
FUNC1RC(AABB, mesh_get_custom_aabb, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC1(mesh_clear, RID)
|
|
|
|
|
|
|
|
/* MULTIMESH API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(multimesh)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2019-09-14 05:37:42 +02:00
|
|
|
FUNC5(multimesh_allocate, RID, int, MultimeshTransformFormat, bool, bool)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC1RC(int, multimesh_get_instance_count, RID)
|
|
|
|
|
|
|
|
FUNC2(multimesh_set_mesh, RID, RID)
|
|
|
|
FUNC3(multimesh_instance_set_transform, RID, int, const Transform &)
|
|
|
|
FUNC3(multimesh_instance_set_transform_2d, RID, int, const Transform2D &)
|
|
|
|
FUNC3(multimesh_instance_set_color, RID, int, const Color &)
|
2018-07-07 01:21:13 +02:00
|
|
|
FUNC3(multimesh_instance_set_custom_data, RID, int, const Color &)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC1RC(RID, multimesh_get_mesh, RID)
|
2017-11-17 03:09:00 +01:00
|
|
|
FUNC1RC(AABB, multimesh_get_aabb, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2RC(Transform, multimesh_instance_get_transform, RID, int)
|
|
|
|
FUNC2RC(Transform2D, multimesh_instance_get_transform_2d, RID, int)
|
|
|
|
FUNC2RC(Color, multimesh_instance_get_color, RID, int)
|
2018-07-07 01:21:13 +02:00
|
|
|
FUNC2RC(Color, multimesh_instance_get_custom_data, RID, int)
|
|
|
|
|
2020-02-17 22:06:54 +01:00
|
|
|
FUNC2(multimesh_set_buffer, RID, const Vector<float> &)
|
|
|
|
FUNC1RC(Vector<float>, multimesh_get_buffer, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(multimesh_set_visible_instances, RID, int)
|
|
|
|
FUNC1RC(int, multimesh_get_visible_instances, RID)
|
|
|
|
|
|
|
|
/* IMMEDIATE API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(immediate)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3(immediate_begin, RID, PrimitiveType, RID)
|
|
|
|
FUNC2(immediate_vertex, RID, const Vector3 &)
|
|
|
|
FUNC2(immediate_normal, RID, const Vector3 &)
|
|
|
|
FUNC2(immediate_tangent, RID, const Plane &)
|
|
|
|
FUNC2(immediate_color, RID, const Color &)
|
|
|
|
FUNC2(immediate_uv, RID, const Vector2 &)
|
|
|
|
FUNC2(immediate_uv2, RID, const Vector2 &)
|
|
|
|
FUNC1(immediate_end, RID)
|
|
|
|
FUNC1(immediate_clear, RID)
|
|
|
|
FUNC2(immediate_set_material, RID, RID)
|
|
|
|
FUNC1RC(RID, immediate_get_material, RID)
|
|
|
|
|
|
|
|
/* SKELETON API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(skeleton)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3(skeleton_allocate, RID, int, bool)
|
|
|
|
FUNC1RC(int, skeleton_get_bone_count, RID)
|
|
|
|
FUNC3(skeleton_bone_set_transform, RID, int, const Transform &)
|
|
|
|
FUNC2RC(Transform, skeleton_bone_get_transform, RID, int)
|
|
|
|
FUNC3(skeleton_bone_set_transform_2d, RID, int, const Transform2D &)
|
|
|
|
FUNC2RC(Transform2D, skeleton_bone_get_transform_2d, RID, int)
|
2018-05-03 22:29:15 +02:00
|
|
|
FUNC2(skeleton_set_base_transform_2d, RID, const Transform2D &)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
/* Light API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(directional_light)
|
|
|
|
FUNCRID(omni_light)
|
|
|
|
FUNCRID(spot_light)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(light_set_color, RID, const Color &)
|
|
|
|
FUNC3(light_set_param, RID, LightParam, float)
|
|
|
|
FUNC2(light_set_shadow, RID, bool)
|
|
|
|
FUNC2(light_set_shadow_color, RID, const Color &)
|
|
|
|
FUNC2(light_set_projector, RID, RID)
|
|
|
|
FUNC2(light_set_negative, RID, bool)
|
|
|
|
FUNC2(light_set_cull_mask, RID, uint32_t)
|
2017-08-20 01:06:40 +02:00
|
|
|
FUNC2(light_set_reverse_cull_face_mode, RID, bool)
|
2020-06-25 15:33:28 +02:00
|
|
|
FUNC2(light_set_bake_mode, RID, LightBakeMode)
|
|
|
|
FUNC2(light_set_max_sdfgi_cascade, RID, uint32_t)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(light_omni_set_shadow_mode, RID, LightOmniShadowMode)
|
|
|
|
|
|
|
|
FUNC2(light_directional_set_shadow_mode, RID, LightDirectionalShadowMode)
|
|
|
|
FUNC2(light_directional_set_blend_splits, RID, bool)
|
2017-09-07 23:00:47 +02:00
|
|
|
FUNC2(light_directional_set_shadow_depth_range_mode, RID, LightDirectionalShadowDepthRangeMode)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
/* PROBE API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(reflection_probe)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(reflection_probe_set_update_mode, RID, ReflectionProbeUpdateMode)
|
|
|
|
FUNC2(reflection_probe_set_intensity, RID, float)
|
2020-06-25 15:33:28 +02:00
|
|
|
FUNC2(reflection_probe_set_ambient_color, RID, const Color &)
|
|
|
|
FUNC2(reflection_probe_set_ambient_energy, RID, float)
|
|
|
|
FUNC2(reflection_probe_set_ambient_mode, RID, ReflectionProbeAmbientMode)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(reflection_probe_set_max_distance, RID, float)
|
|
|
|
FUNC2(reflection_probe_set_extents, RID, const Vector3 &)
|
|
|
|
FUNC2(reflection_probe_set_origin_offset, RID, const Vector3 &)
|
|
|
|
FUNC2(reflection_probe_set_as_interior, RID, bool)
|
|
|
|
FUNC2(reflection_probe_set_enable_box_projection, RID, bool)
|
|
|
|
FUNC2(reflection_probe_set_enable_shadows, RID, bool)
|
|
|
|
FUNC2(reflection_probe_set_cull_mask, RID, uint32_t)
|
2018-09-28 21:40:20 +02:00
|
|
|
FUNC2(reflection_probe_set_resolution, RID, int)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-04-14 05:05:21 +02:00
|
|
|
/* DECAL API */
|
|
|
|
|
|
|
|
FUNCRID(decal)
|
|
|
|
|
|
|
|
FUNC2(decal_set_extents, RID, const Vector3 &)
|
|
|
|
FUNC3(decal_set_texture, RID, DecalTexture, RID)
|
|
|
|
FUNC2(decal_set_emission_energy, RID, float)
|
|
|
|
FUNC2(decal_set_albedo_mix, RID, float)
|
|
|
|
FUNC2(decal_set_modulate, RID, const Color &)
|
|
|
|
FUNC2(decal_set_cull_mask, RID, uint32_t)
|
|
|
|
FUNC4(decal_set_distance_fade, RID, bool, float, float)
|
|
|
|
FUNC3(decal_set_fade, RID, float, float)
|
|
|
|
FUNC2(decal_set_normal_fade, RID, float)
|
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
/* BAKED LIGHT API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(gi_probe)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-02-17 22:06:54 +01:00
|
|
|
FUNC8(gi_probe_allocate, RID, const Transform &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2019-10-03 22:39:08 +02:00
|
|
|
FUNC1RC(AABB, gi_probe_get_bounds, RID)
|
|
|
|
FUNC1RC(Vector3i, gi_probe_get_octree_size, RID)
|
2020-02-17 22:06:54 +01:00
|
|
|
FUNC1RC(Vector<uint8_t>, gi_probe_get_octree_cells, RID)
|
|
|
|
FUNC1RC(Vector<uint8_t>, gi_probe_get_data_cells, RID)
|
|
|
|
FUNC1RC(Vector<uint8_t>, gi_probe_get_distance_field, RID)
|
|
|
|
FUNC1RC(Vector<int>, gi_probe_get_level_counts, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC1RC(Transform, gi_probe_get_to_cell_xform, RID)
|
|
|
|
|
2019-10-03 22:39:08 +02:00
|
|
|
FUNC2(gi_probe_set_dynamic_range, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_dynamic_range, RID)
|
|
|
|
|
|
|
|
FUNC2(gi_probe_set_propagation, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_propagation, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(gi_probe_set_energy, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_energy, RID)
|
|
|
|
|
2019-10-14 08:45:44 +02:00
|
|
|
FUNC2(gi_probe_set_ao, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_ao, RID)
|
|
|
|
|
2019-11-04 22:17:53 +01:00
|
|
|
FUNC2(gi_probe_set_ao_size, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_ao_size, RID)
|
2019-10-14 08:45:44 +02:00
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(gi_probe_set_bias, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_bias, RID)
|
|
|
|
|
2017-07-16 04:24:37 +02:00
|
|
|
FUNC2(gi_probe_set_normal_bias, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_normal_bias, RID)
|
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(gi_probe_set_interior, RID, bool)
|
|
|
|
FUNC1RC(bool, gi_probe_is_interior, RID)
|
|
|
|
|
2019-10-03 22:39:08 +02:00
|
|
|
FUNC2(gi_probe_set_use_two_bounces, RID, bool)
|
|
|
|
FUNC1RC(bool, gi_probe_is_using_two_bounces, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2019-10-03 22:39:08 +02:00
|
|
|
FUNC2(gi_probe_set_anisotropy_strength, RID, float)
|
|
|
|
FUNC1RC(float, gi_probe_get_anisotropy_strength, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-06-25 15:33:28 +02:00
|
|
|
FUNC1(gi_probe_set_quality, GIProbeQuality)
|
|
|
|
|
2017-12-14 12:59:46 +01:00
|
|
|
/* LIGHTMAP CAPTURE */
|
|
|
|
|
2020-05-01 14:34:23 +02:00
|
|
|
FUNCRID(lightmap)
|
|
|
|
FUNC3(lightmap_set_textures, RID, RID, bool)
|
|
|
|
FUNC2(lightmap_set_probe_bounds, RID, const AABB &)
|
|
|
|
FUNC2(lightmap_set_probe_interior, RID, bool)
|
|
|
|
FUNC5(lightmap_set_probe_capture_data, RID, const PackedVector3Array &, const PackedColorArray &, const PackedInt32Array &, const PackedInt32Array &)
|
|
|
|
FUNC1RC(PackedVector3Array, lightmap_get_probe_capture_points, RID)
|
|
|
|
FUNC1RC(PackedColorArray, lightmap_get_probe_capture_sh, RID)
|
|
|
|
FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_tetrahedra, RID)
|
|
|
|
FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_bsp_tree, RID)
|
2017-12-14 12:59:46 +01:00
|
|
|
|
2020-05-01 14:34:23 +02:00
|
|
|
FUNC1(lightmap_set_probe_capture_update_speed, float)
|
2017-12-14 12:59:46 +01:00
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
/* PARTICLES */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(particles)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(particles_set_emitting, RID, bool)
|
2017-12-23 05:08:50 +01:00
|
|
|
FUNC1R(bool, particles_get_emitting, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(particles_set_amount, RID, int)
|
|
|
|
FUNC2(particles_set_lifetime, RID, float)
|
2017-06-25 13:01:15 +02:00
|
|
|
FUNC2(particles_set_one_shot, RID, bool)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(particles_set_pre_process_time, RID, float)
|
|
|
|
FUNC2(particles_set_explosiveness_ratio, RID, float)
|
|
|
|
FUNC2(particles_set_randomness_ratio, RID, float)
|
2017-11-17 03:09:00 +01:00
|
|
|
FUNC2(particles_set_custom_aabb, RID, const AABB &)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(particles_set_speed_scale, RID, float)
|
|
|
|
FUNC2(particles_set_use_local_coordinates, RID, bool)
|
|
|
|
FUNC2(particles_set_process_material, RID, RID)
|
|
|
|
FUNC2(particles_set_fixed_fps, RID, int)
|
|
|
|
FUNC2(particles_set_fractional_delta, RID, bool)
|
2020-10-08 02:29:49 +02:00
|
|
|
FUNC2(particles_set_collision_base_size, RID, float)
|
|
|
|
|
2019-11-09 09:51:17 +01:00
|
|
|
FUNC1R(bool, particles_is_inactive, RID)
|
|
|
|
FUNC1(particles_request_process, RID)
|
2017-06-25 13:01:15 +02:00
|
|
|
FUNC1(particles_restart, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-09-06 14:18:10 +02:00
|
|
|
FUNC6(particles_emit, RID, const Transform &, const Vector3 &, const Color &, const Color &, uint32_t)
|
|
|
|
|
2020-03-27 19:21:27 +01:00
|
|
|
FUNC2(particles_set_draw_order, RID, RS::ParticlesDrawOrder)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(particles_set_draw_passes, RID, int)
|
|
|
|
FUNC3(particles_set_draw_pass_mesh, RID, int, RID)
|
2017-06-21 21:25:45 +02:00
|
|
|
FUNC2(particles_set_emission_transform, RID, const Transform &)
|
2020-09-06 14:18:10 +02:00
|
|
|
FUNC2(particles_set_subemitter, RID, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2017-11-17 03:09:00 +01:00
|
|
|
FUNC1R(AABB, particles_get_current_aabb, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-10-08 02:29:49 +02:00
|
|
|
/* PARTICLES COLLISION */
|
|
|
|
|
|
|
|
FUNCRID(particles_collision)
|
|
|
|
|
|
|
|
FUNC2(particles_collision_set_collision_type, RID, ParticlesCollisionType)
|
|
|
|
FUNC2(particles_collision_set_cull_mask, RID, uint32_t)
|
|
|
|
FUNC2(particles_collision_set_sphere_radius, RID, float)
|
|
|
|
FUNC2(particles_collision_set_box_extents, RID, const Vector3 &)
|
|
|
|
FUNC2(particles_collision_set_attractor_strength, RID, float)
|
|
|
|
FUNC2(particles_collision_set_attractor_directionality, RID, float)
|
|
|
|
FUNC2(particles_collision_set_attractor_attenuation, RID, float)
|
|
|
|
FUNC2(particles_collision_set_field_texture, RID, RID)
|
|
|
|
FUNC1(particles_collision_height_field_update, RID)
|
|
|
|
FUNC2(particles_collision_set_height_field_resolution, RID, ParticlesCollisionHeightfieldResolution)
|
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
/* CAMERA API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(camera)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC4(camera_set_perspective, RID, float, float, float)
|
|
|
|
FUNC4(camera_set_orthogonal, RID, float, float, float)
|
2019-02-19 17:17:02 +01:00
|
|
|
FUNC5(camera_set_frustum, RID, float, Vector2, float, float)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(camera_set_transform, RID, const Transform &)
|
|
|
|
FUNC2(camera_set_cull_mask, RID, uint32_t)
|
|
|
|
FUNC2(camera_set_environment, RID, RID)
|
2020-01-13 19:37:24 +01:00
|
|
|
FUNC2(camera_set_camera_effects, RID, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(camera_set_use_vertical_aspect, RID, bool)
|
|
|
|
|
|
|
|
/* VIEWPORT TARGET API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(viewport)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-04-08 16:47:36 +02:00
|
|
|
FUNC2(viewport_set_use_xr, RID, bool)
|
2017-04-23 14:10:41 +02:00
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3(viewport_set_size, RID, int, int)
|
|
|
|
|
|
|
|
FUNC2(viewport_set_active, RID, bool)
|
|
|
|
FUNC2(viewport_set_parent_viewport, RID, RID)
|
|
|
|
|
|
|
|
FUNC2(viewport_set_clear_mode, RID, ViewportClearMode)
|
|
|
|
|
2020-03-04 02:51:12 +01:00
|
|
|
FUNC3(viewport_attach_to_screen, RID, const Rect2 &, DisplayServer::WindowID)
|
2019-05-08 20:25:34 +02:00
|
|
|
FUNC2(viewport_set_render_direct_to_screen, RID, bool)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(viewport_set_update_mode, RID, ViewportUpdateMode)
|
|
|
|
|
|
|
|
FUNC1RC(RID, viewport_get_texture, RID)
|
|
|
|
|
|
|
|
FUNC2(viewport_set_hide_scenario, RID, bool)
|
|
|
|
FUNC2(viewport_set_hide_canvas, RID, bool)
|
|
|
|
FUNC2(viewport_set_disable_environment, RID, bool)
|
|
|
|
|
|
|
|
FUNC2(viewport_attach_camera, RID, RID)
|
|
|
|
FUNC2(viewport_set_scenario, RID, RID)
|
|
|
|
FUNC2(viewport_attach_canvas, RID, RID)
|
|
|
|
|
|
|
|
FUNC2(viewport_remove_canvas, RID, RID)
|
|
|
|
FUNC3(viewport_set_canvas_transform, RID, RID, const Transform2D &)
|
|
|
|
FUNC2(viewport_set_transparent_background, RID, bool)
|
|
|
|
|
|
|
|
FUNC2(viewport_set_global_canvas_transform, RID, const Transform2D &)
|
2018-10-30 21:53:00 +01:00
|
|
|
FUNC4(viewport_set_canvas_stacking, RID, RID, int, int)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(viewport_set_shadow_atlas_size, RID, int)
|
|
|
|
FUNC3(viewport_set_shadow_atlas_quadrant_subdivision, RID, int, int)
|
|
|
|
FUNC2(viewport_set_msaa, RID, ViewportMSAA)
|
2020-04-12 06:49:10 +02:00
|
|
|
FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2018-01-18 21:37:17 +01:00
|
|
|
//this passes directly to avoid stalling, but it's pretty dangerous, so don't call after freeing a viewport
|
2017-06-11 23:13:04 +02:00
|
|
|
virtual int viewport_get_render_info(RID p_viewport, ViewportRenderInfo p_info) {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->viewport_get_render_info(p_viewport, p_info);
|
2017-06-11 23:13:04 +02:00
|
|
|
}
|
|
|
|
|
2017-06-11 20:52:03 +02:00
|
|
|
FUNC2(viewport_set_debug_draw, RID, ViewportDebugDraw)
|
|
|
|
|
2020-04-10 19:18:42 +02:00
|
|
|
FUNC2(viewport_set_measure_render_time, RID, bool)
|
|
|
|
virtual float viewport_get_measured_render_time_cpu(RID p_viewport) const {
|
|
|
|
return rendering_server->viewport_get_measured_render_time_cpu(p_viewport);
|
|
|
|
}
|
|
|
|
virtual float viewport_get_measured_render_time_gpu(RID p_viewport) const {
|
|
|
|
return rendering_server->viewport_get_measured_render_time_gpu(p_viewport);
|
|
|
|
}
|
|
|
|
|
2019-09-07 03:51:27 +02:00
|
|
|
FUNC1(directional_shadow_atlas_set_size, int)
|
|
|
|
|
2019-08-26 22:43:58 +02:00
|
|
|
/* SKY API */
|
|
|
|
|
|
|
|
FUNCRID(sky)
|
|
|
|
FUNC2(sky_set_radiance_size, RID, int)
|
|
|
|
FUNC2(sky_set_mode, RID, SkyMode)
|
2020-03-20 01:32:19 +01:00
|
|
|
FUNC2(sky_set_material, RID, RID)
|
2020-05-01 14:34:23 +02:00
|
|
|
FUNC4R(Ref<Image>, sky_bake_panorama, RID, float, bool, const Size2i &)
|
2019-08-26 22:43:58 +02:00
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
/* ENVIRONMENT API */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(environment)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(environment_set_background, RID, EnvironmentBG)
|
|
|
|
FUNC2(environment_set_sky, RID, RID)
|
2017-09-29 23:56:05 +02:00
|
|
|
FUNC2(environment_set_sky_custom_fov, RID, float)
|
2018-12-15 06:27:03 +01:00
|
|
|
FUNC2(environment_set_sky_orientation, RID, const Basis &)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(environment_set_bg_color, RID, const Color &)
|
|
|
|
FUNC2(environment_set_bg_energy, RID, float)
|
|
|
|
FUNC2(environment_set_canvas_max_layer, RID, int)
|
2020-01-25 11:18:55 +01:00
|
|
|
FUNC7(environment_set_ambient_light, RID, const Color &, EnvironmentAmbientSource, float, float, EnvironmentReflectionSource, const Color &)
|
2019-08-26 22:43:58 +02:00
|
|
|
|
2019-06-11 20:43:37 +02:00
|
|
|
// FIXME: Disabled during Vulkan refactoring, should be ported.
|
|
|
|
#if 0
|
2017-08-20 16:17:24 +02:00
|
|
|
FUNC2(environment_set_camera_feed_id, RID, int)
|
2019-06-11 20:43:37 +02:00
|
|
|
#endif
|
2020-04-02 04:24:52 +02:00
|
|
|
FUNC6(environment_set_ssr, RID, bool, int, float, float, float)
|
|
|
|
FUNC1(environment_set_ssr_roughness_quality, EnvironmentSSRRoughnessQuality)
|
|
|
|
|
2020-01-25 11:18:55 +01:00
|
|
|
FUNC9(environment_set_ssao, RID, bool, float, float, float, float, float, EnvironmentSSAOBlur, float)
|
|
|
|
|
|
|
|
FUNC2(environment_set_ssao_quality, EnvironmentSSAOQuality, bool)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-07-01 14:18:13 +02:00
|
|
|
FUNC11(environment_set_sdfgi, RID, bool, EnvironmentSDFGICascades, float, EnvironmentSDFGIYScale, bool, bool, bool, float, float, float)
|
2020-06-25 15:33:28 +02:00
|
|
|
FUNC1(environment_set_sdfgi_ray_count, EnvironmentSDFGIRayCount)
|
|
|
|
FUNC1(environment_set_sdfgi_frames_to_converge, EnvironmentSDFGIFramesToConverge)
|
|
|
|
|
2020-03-30 15:46:03 +02:00
|
|
|
FUNC11(environment_set_glow, RID, bool, int, float, float, float, float, EnvironmentGlowBlendMode, float, float, float)
|
|
|
|
FUNC1(environment_glow_set_use_bicubic_upscale, bool)
|
2020-09-01 08:04:45 +02:00
|
|
|
FUNC1(environment_glow_set_use_high_quality, bool)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC9(environment_set_tonemap, RID, EnvironmentToneMapper, float, float, bool, float, float, float, float)
|
|
|
|
|
|
|
|
FUNC6(environment_set_adjustment, RID, bool, float, float, float, RID)
|
|
|
|
|
2020-08-21 07:48:04 +02:00
|
|
|
FUNC9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
|
2020-08-14 03:07:49 +02:00
|
|
|
|
2020-08-13 03:21:01 +02:00
|
|
|
FUNC9(environment_set_volumetric_fog, RID, bool, float, const Color &, float, float, float, float, EnvVolumetricFogShadowFilter)
|
|
|
|
|
|
|
|
FUNC2(environment_set_volumetric_fog_volume_size, int, int)
|
|
|
|
FUNC1(environment_set_volumetric_fog_filter_active, bool)
|
|
|
|
FUNC1(environment_set_volumetric_fog_directional_shadow_shrink_size, int)
|
|
|
|
FUNC1(environment_set_volumetric_fog_positional_shadow_shrink_size, int)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-05-01 14:34:23 +02:00
|
|
|
FUNC3R(Ref<Image>, environment_bake_panorama, RID, bool, const Size2i &)
|
|
|
|
|
2020-06-25 15:33:28 +02:00
|
|
|
FUNC3(screen_space_roughness_limiter_set_active, bool, float, float)
|
2020-04-04 04:42:26 +02:00
|
|
|
FUNC1(sub_surface_scattering_set_quality, SubSurfaceScatteringQuality)
|
|
|
|
FUNC2(sub_surface_scattering_set_scale, float, float)
|
2020-01-27 00:09:40 +01:00
|
|
|
|
2020-01-13 19:37:24 +01:00
|
|
|
FUNCRID(camera_effects)
|
|
|
|
|
2020-01-16 01:23:21 +01:00
|
|
|
FUNC2(camera_effects_set_dof_blur_quality, DOFBlurQuality, bool)
|
|
|
|
FUNC1(camera_effects_set_dof_blur_bokeh_shape, DOFBokehShape)
|
|
|
|
|
|
|
|
FUNC8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
|
2020-01-13 19:37:24 +01:00
|
|
|
FUNC3(camera_effects_set_custom_exposure, RID, bool, float)
|
|
|
|
|
2020-04-10 11:30:36 +02:00
|
|
|
FUNC1(shadows_quality_set, ShadowQuality);
|
|
|
|
FUNC1(directional_shadow_quality_set, ShadowQuality);
|
2020-04-08 03:51:52 +02:00
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(scenario)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(scenario_set_debug, RID, ScenarioDebugMode)
|
|
|
|
FUNC2(scenario_set_environment, RID, RID)
|
2020-01-13 19:37:24 +01:00
|
|
|
FUNC2(scenario_set_camera_effects, RID, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(scenario_set_fallback_environment, RID, RID)
|
|
|
|
|
|
|
|
/* INSTANCING API */
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(instance)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-01-21 21:32:27 +01:00
|
|
|
FUNC2(instance_set_base, RID, RID)
|
|
|
|
FUNC2(instance_set_scenario, RID, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(instance_set_layer_mask, RID, uint32_t)
|
|
|
|
FUNC2(instance_set_transform, RID, const Transform &)
|
2017-08-07 12:17:31 +02:00
|
|
|
FUNC2(instance_attach_object_instance_id, RID, ObjectID)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3(instance_set_blend_shape_weight, RID, int, float)
|
|
|
|
FUNC3(instance_set_surface_material, RID, int, RID)
|
|
|
|
FUNC2(instance_set_visible, RID, bool)
|
2017-12-14 12:59:46 +01:00
|
|
|
|
2017-11-20 20:54:26 +01:00
|
|
|
FUNC2(instance_set_custom_aabb, RID, AABB)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(instance_attach_skeleton, RID, RID)
|
|
|
|
FUNC2(instance_set_exterior, RID, bool)
|
|
|
|
|
|
|
|
FUNC2(instance_set_extra_visibility_margin, RID, real_t)
|
|
|
|
|
|
|
|
// don't use these in a game!
|
2017-11-17 03:09:00 +01:00
|
|
|
FUNC2RC(Vector<ObjectID>, instances_cull_aabb, const AABB &, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3RC(Vector<ObjectID>, instances_cull_ray, const Vector3 &, const Vector3 &, RID)
|
|
|
|
FUNC2RC(Vector<ObjectID>, instances_cull_convex, const Vector<Plane> &, RID)
|
|
|
|
|
|
|
|
FUNC3(instance_geometry_set_flag, RID, InstanceFlags, bool)
|
|
|
|
FUNC2(instance_geometry_set_cast_shadows_setting, RID, ShadowCastingSetting)
|
|
|
|
FUNC2(instance_geometry_set_material_override, RID, RID)
|
|
|
|
|
|
|
|
FUNC5(instance_geometry_set_draw_range, RID, float, float, float, float)
|
|
|
|
FUNC2(instance_geometry_set_as_instance_lod, RID, RID)
|
2020-05-01 14:34:23 +02:00
|
|
|
FUNC4(instance_geometry_set_lightmap, RID, RID, const Rect2 &, int)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2020-04-17 04:52:00 +02:00
|
|
|
FUNC3(instance_geometry_set_shader_parameter, RID, const StringName &, const Variant &)
|
|
|
|
FUNC2RC(Variant, instance_geometry_get_shader_parameter, RID, const StringName &)
|
|
|
|
FUNC2RC(Variant, instance_geometry_get_shader_parameter_default_value, RID, const StringName &)
|
|
|
|
FUNC2SC(instance_geometry_get_shader_parameter_list, RID, List<PropertyInfo> *)
|
|
|
|
|
2020-05-01 14:34:23 +02:00
|
|
|
/* BAKE */
|
|
|
|
|
|
|
|
FUNC3R(TypedArray<Image>, bake_render_uv2, RID, const Vector<RID> &, const Size2i &)
|
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
/* CANVAS (2D) */
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(canvas)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3(canvas_set_item_mirroring, RID, RID, const Point2 &)
|
|
|
|
FUNC2(canvas_set_modulate, RID, const Color &)
|
2019-04-05 15:24:54 +02:00
|
|
|
FUNC3(canvas_set_parent, RID, RID, float)
|
|
|
|
FUNC1(canvas_set_disable_scale, bool)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(canvas_item)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(canvas_item_set_parent, RID, RID)
|
|
|
|
|
|
|
|
FUNC2(canvas_item_set_visible, RID, bool)
|
|
|
|
FUNC2(canvas_item_set_light_mask, RID, int)
|
|
|
|
|
2018-08-29 21:48:32 +02:00
|
|
|
FUNC2(canvas_item_set_update_when_visible, RID, bool)
|
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(canvas_item_set_transform, RID, const Transform2D &)
|
|
|
|
FUNC2(canvas_item_set_clip, RID, bool)
|
|
|
|
FUNC2(canvas_item_set_distance_field_mode, RID, bool)
|
|
|
|
FUNC3(canvas_item_set_custom_rect, RID, bool, const Rect2 &)
|
|
|
|
FUNC2(canvas_item_set_modulate, RID, const Color &)
|
|
|
|
FUNC2(canvas_item_set_self_modulate, RID, const Color &)
|
|
|
|
|
|
|
|
FUNC2(canvas_item_set_draw_behind_parent, RID, bool)
|
|
|
|
|
2019-06-16 04:45:24 +02:00
|
|
|
FUNC2(canvas_item_set_default_texture_filter, RID, CanvasItemTextureFilter)
|
|
|
|
FUNC2(canvas_item_set_default_texture_repeat, RID, CanvasItemTextureRepeat)
|
|
|
|
|
2019-06-25 03:24:07 +02:00
|
|
|
FUNC5(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float)
|
|
|
|
FUNC4(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float)
|
|
|
|
FUNC4(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC3(canvas_item_add_rect, RID, const Rect2 &, const Color &)
|
|
|
|
FUNC4(canvas_item_add_circle, RID, const Point2 &, float, const Color &)
|
2019-06-16 04:45:24 +02:00
|
|
|
FUNC11(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
|
|
|
FUNC12(canvas_item_add_texture_rect_region, RID, const Rect2 &, RID, const Rect2 &, const Color &, bool, RID, RID, const Color &, bool, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
|
|
|
FUNC15(canvas_item_add_nine_patch, RID, const Rect2 &, const Rect2 &, RID, const Vector2 &, const Vector2 &, NinePatchAxisMode, NinePatchAxisMode, bool, const Color &, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
|
|
|
FUNC11(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
2019-06-25 03:24:07 +02:00
|
|
|
FUNC10(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
|
|
|
FUNC14(canvas_item_add_triangle_array, RID, const Vector<int> &, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, const Vector<int> &, const Vector<float> &, RID, int, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
2019-06-16 04:45:24 +02:00
|
|
|
FUNC10(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
|
|
|
FUNC8(canvas_item_add_multimesh, RID, RID, RID, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
|
|
|
FUNC8(canvas_item_add_particles, RID, RID, RID, RID, RID, const Color &, CanvasItemTextureFilter, CanvasItemTextureRepeat)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(canvas_item_add_set_transform, RID, const Transform2D &)
|
|
|
|
FUNC2(canvas_item_add_clip_ignore, RID, bool)
|
|
|
|
FUNC2(canvas_item_set_sort_children_by_y, RID, bool)
|
2017-12-29 23:06:03 +01:00
|
|
|
FUNC2(canvas_item_set_z_index, RID, int)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(canvas_item_set_z_as_relative_to_parent, RID, bool)
|
|
|
|
FUNC3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &)
|
2018-02-21 21:23:27 +01:00
|
|
|
FUNC2(canvas_item_attach_skeleton, RID, RID)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC1(canvas_item_clear, RID)
|
|
|
|
FUNC2(canvas_item_set_draw_index, RID, int)
|
|
|
|
|
|
|
|
FUNC2(canvas_item_set_material, RID, RID)
|
|
|
|
|
|
|
|
FUNC2(canvas_item_set_use_parent_material, RID, bool)
|
|
|
|
|
|
|
|
FUNC0R(RID, canvas_light_create)
|
|
|
|
FUNC2(canvas_light_attach_to_canvas, RID, RID)
|
|
|
|
FUNC2(canvas_light_set_enabled, RID, bool)
|
|
|
|
FUNC2(canvas_light_set_scale, RID, float)
|
|
|
|
FUNC2(canvas_light_set_transform, RID, const Transform2D &)
|
|
|
|
FUNC2(canvas_light_set_texture, RID, RID)
|
|
|
|
FUNC2(canvas_light_set_texture_offset, RID, const Vector2 &)
|
|
|
|
FUNC2(canvas_light_set_color, RID, const Color &)
|
|
|
|
FUNC2(canvas_light_set_height, RID, float)
|
|
|
|
FUNC2(canvas_light_set_energy, RID, float)
|
|
|
|
FUNC3(canvas_light_set_z_range, RID, int, int)
|
|
|
|
FUNC3(canvas_light_set_layer_range, RID, int, int)
|
|
|
|
FUNC2(canvas_light_set_item_cull_mask, RID, int)
|
|
|
|
FUNC2(canvas_light_set_item_shadow_cull_mask, RID, int)
|
|
|
|
|
|
|
|
FUNC2(canvas_light_set_mode, RID, CanvasLightMode)
|
|
|
|
|
|
|
|
FUNC2(canvas_light_set_shadow_enabled, RID, bool)
|
|
|
|
FUNC2(canvas_light_set_shadow_buffer_size, RID, int)
|
|
|
|
FUNC2(canvas_light_set_shadow_filter, RID, CanvasLightShadowFilter)
|
|
|
|
FUNC2(canvas_light_set_shadow_color, RID, const Color &)
|
2017-06-13 06:23:04 +02:00
|
|
|
FUNC2(canvas_light_set_shadow_smooth, RID, float)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(canvas_light_occluder)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC2(canvas_light_occluder_attach_to_canvas, RID, RID)
|
|
|
|
FUNC2(canvas_light_occluder_set_enabled, RID, bool)
|
|
|
|
FUNC2(canvas_light_occluder_set_polygon, RID, RID)
|
|
|
|
FUNC2(canvas_light_occluder_set_transform, RID, const Transform2D &)
|
|
|
|
FUNC2(canvas_light_occluder_set_light_mask, RID, int)
|
|
|
|
|
2017-11-10 03:34:01 +01:00
|
|
|
FUNCRID(canvas_occluder_polygon)
|
2020-02-17 22:06:54 +01:00
|
|
|
FUNC3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool)
|
|
|
|
FUNC2(canvas_occluder_polygon_set_shape_as_lines, RID, const Vector<Vector2> &)
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
|
|
|
|
|
2020-04-17 04:52:00 +02:00
|
|
|
/* GLOBAL VARIABLES */
|
|
|
|
|
|
|
|
FUNC3(global_variable_add, const StringName &, GlobalVariableType, const Variant &)
|
|
|
|
FUNC1(global_variable_remove, const StringName &)
|
|
|
|
FUNC0RC(Vector<StringName>, global_variable_get_list)
|
|
|
|
FUNC2(global_variable_set, const StringName &, const Variant &)
|
|
|
|
FUNC2(global_variable_set_override, const StringName &, const Variant &)
|
|
|
|
FUNC1RC(GlobalVariableType, global_variable_get_type, const StringName &)
|
|
|
|
FUNC1RC(Variant, global_variable_get, const StringName &)
|
|
|
|
FUNC1(global_variables_load_settings, bool)
|
|
|
|
FUNC0(global_variables_clear)
|
|
|
|
|
2017-06-09 05:23:50 +02:00
|
|
|
/* BLACK BARS */
|
|
|
|
|
|
|
|
FUNC4(black_bars_set_margins, int, int, int, int)
|
|
|
|
FUNC4(black_bars_set_images, RID, RID, RID, RID)
|
|
|
|
|
|
|
|
/* FREE */
|
|
|
|
|
|
|
|
FUNC1(free, RID)
|
|
|
|
|
|
|
|
/* EVENT QUEUING */
|
|
|
|
|
|
|
|
FUNC3(request_frame_drawn_callback, Object *, const StringName &, const Variant &)
|
|
|
|
|
|
|
|
virtual void init();
|
|
|
|
virtual void finish();
|
2018-05-09 08:11:43 +02:00
|
|
|
virtual void draw(bool p_swap_buffers, double frame_step);
|
2017-06-09 05:23:50 +02:00
|
|
|
virtual void sync();
|
|
|
|
FUNC0RC(bool, has_changed)
|
|
|
|
|
|
|
|
/* RENDER INFO */
|
|
|
|
|
2017-06-11 23:13:04 +02:00
|
|
|
//this passes directly to avoid stalling
|
|
|
|
virtual int get_render_info(RenderInfo p_info) {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->get_render_info(p_info);
|
2017-06-11 23:13:04 +02:00
|
|
|
}
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2019-09-13 20:08:05 +02:00
|
|
|
virtual String get_video_adapter_name() const {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->get_video_adapter_name();
|
2019-09-13 20:08:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual String get_video_adapter_vendor() const {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->get_video_adapter_vendor();
|
2019-09-13 20:08:05 +02:00
|
|
|
}
|
|
|
|
|
2019-06-13 22:37:19 +02:00
|
|
|
FUNC4(set_boot_image, const Ref<Image> &, const Color &, bool, bool)
|
2017-06-09 05:23:50 +02:00
|
|
|
FUNC1(set_default_clear_color, const Color &)
|
|
|
|
|
|
|
|
FUNC0R(RID, get_test_cube)
|
|
|
|
|
2017-06-11 20:52:03 +02:00
|
|
|
FUNC1(set_debug_generate_wireframes, bool)
|
|
|
|
|
2020-01-13 19:37:24 +01:00
|
|
|
virtual bool has_feature(Features p_feature) const {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->has_feature(p_feature);
|
2020-01-13 19:37:24 +01:00
|
|
|
}
|
|
|
|
virtual bool has_os_feature(const String &p_feature) const {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->has_os_feature(p_feature);
|
2020-01-13 19:37:24 +01:00
|
|
|
}
|
2017-06-09 05:23:50 +02:00
|
|
|
|
2017-12-16 21:09:25 +01:00
|
|
|
FUNC1(call_set_use_vsync, bool)
|
|
|
|
|
|
|
|
static void set_use_vsync_callback(bool p_enable);
|
|
|
|
|
2018-09-29 01:32:40 +02:00
|
|
|
virtual bool is_low_end() const {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->is_low_end();
|
2018-09-29 01:32:40 +02:00
|
|
|
}
|
|
|
|
|
2019-09-20 22:58:06 +02:00
|
|
|
virtual uint64_t get_frame_profile_frame() {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->get_frame_profile_frame();
|
2019-09-20 22:58:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual void set_frame_profiling_enabled(bool p_enabled) {
|
2020-03-27 19:21:27 +01:00
|
|
|
rendering_server->set_frame_profiling_enabled(p_enabled);
|
2019-09-20 22:58:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual Vector<FrameProfileArea> get_frame_profile() {
|
2020-03-27 19:21:27 +01:00
|
|
|
return rendering_server->get_frame_profile();
|
2019-09-20 22:58:06 +02:00
|
|
|
}
|
|
|
|
|
2020-06-25 15:33:28 +02:00
|
|
|
virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) {
|
|
|
|
rendering_server->sdfgi_set_debug_probe_select(p_position, p_dir);
|
|
|
|
}
|
|
|
|
|
2020-03-27 19:21:27 +01:00
|
|
|
RenderingServerWrapMT(RenderingServer *p_contained, bool p_create_thread);
|
|
|
|
~RenderingServerWrapMT();
|
2017-06-09 05:23:50 +02:00
|
|
|
|
|
|
|
#undef ServerName
|
|
|
|
#undef ServerNameWrapMT
|
|
|
|
#undef server_name
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef DEBUG_SYNC
|
|
|
|
#undef DEBUG_SYNC
|
|
|
|
#endif
|
|
|
|
#undef SYNC_DEBUG
|
|
|
|
|
|
|
|
#endif
|