rendering_server_default.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. /*************************************************************************/
  2. /* rendering_server_default.h */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
  9. /* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /*************************************************************************/
  30. #ifndef RENDERING_SERVER_DEFAULT_H
  31. #define RENDERING_SERVER_DEFAULT_H
  32. #include "core/math/octree.h"
  33. #include "core/templates/command_queue_mt.h"
  34. #include "core/templates/ordered_hash_map.h"
  35. #include "renderer_canvas_cull.h"
  36. #include "renderer_scene_cull.h"
  37. #include "renderer_viewport.h"
  38. #include "rendering_server_globals.h"
  39. #include "servers/rendering/renderer_compositor.h"
  40. #include "servers/rendering_server.h"
  41. #include "servers/server_wrap_mt_common.h"
  42. class RenderingServerDefault : public RenderingServer {
  43. enum {
  44. MAX_INSTANCE_CULL = 8192,
  45. MAX_INSTANCE_LIGHTS = 4,
  46. LIGHT_CACHE_DIRTY = -1,
  47. MAX_LIGHTS_CULLED = 256,
  48. MAX_ROOM_CULL = 32,
  49. MAX_EXTERIOR_PORTALS = 128,
  50. MAX_LIGHT_SAMPLERS = 256,
  51. INSTANCE_ROOMLESS_MASK = (1 << 20)
  52. };
  53. static int changes;
  54. RID test_cube;
  55. int black_margin[4];
  56. RID black_image[4];
  57. struct FrameDrawnCallbacks {
  58. ObjectID object;
  59. StringName method;
  60. Variant param;
  61. };
  62. List<FrameDrawnCallbacks> frame_drawn_callbacks;
  63. void _draw_margins();
  64. static void _changes_changed() {}
  65. uint64_t frame_profile_frame;
  66. Vector<FrameProfileArea> frame_profile;
  67. float frame_setup_time = 0;
  68. //for printing
  69. bool print_gpu_profile = false;
  70. OrderedHashMap<String, float> print_gpu_profile_task_time;
  71. uint64_t print_frame_profile_ticks_from = 0;
  72. uint32_t print_frame_profile_frame_count = 0;
  73. mutable CommandQueueMT command_queue;
  74. static void _thread_callback(void *_instance);
  75. void _thread_loop();
  76. Thread::ID server_thread;
  77. SafeFlag exit;
  78. Thread thread;
  79. SafeFlag draw_thread_up;
  80. bool create_thread;
  81. SafeNumeric<uint64_t> draw_pending;
  82. void _thread_draw(bool p_swap_buffers, double frame_step);
  83. void _thread_flush();
  84. void _thread_exit();
  85. Mutex alloc_mutex;
  86. void _draw(bool p_swap_buffers, double frame_step);
  87. void _init();
  88. void _finish();
  89. void _free(RID p_rid);
  90. public:
  91. //if editor is redrawing when it shouldn't, enable this and put a breakpoint in _changes_changed()
  92. //#define DEBUG_CHANGES
  93. #ifdef DEBUG_CHANGES
  94. _FORCE_INLINE_ static void redraw_request() {
  95. changes++;
  96. _changes_changed();
  97. }
  98. #define DISPLAY_CHANGED \
  99. changes++; \
  100. _changes_changed();
  101. #else
  102. _FORCE_INLINE_ static void redraw_request() { changes++; }
  103. #endif
  104. #define WRITE_ACTION redraw_request();
  105. #ifdef DEBUG_SYNC
  106. #define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__));
  107. #else
  108. #define SYNC_DEBUG
  109. #endif
  110. #include "servers/server_wrap_mt_common.h"
  111. //from now on, calls forwarded to this singleton
  112. #define ServerName RendererStorage
  113. #define server_name RSG::storage
  114. /* TEXTURE API */
  115. #define FUNCRIDTEX0(m_type) \
  116. virtual RID m_type##_create() override { \
  117. RID ret = RSG::storage->texture_allocate(); \
  118. if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
  119. RSG::storage->m_type##_initialize(ret); \
  120. } else { \
  121. command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret); \
  122. } \
  123. return ret; \
  124. }
  125. #define FUNCRIDTEX1(m_type, m_type1) \
  126. virtual RID m_type##_create(m_type1 p1) override { \
  127. RID ret = RSG::storage->texture_allocate(); \
  128. if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
  129. RSG::storage->m_type##_initialize(ret, p1); \
  130. } else { \
  131. command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret, p1); \
  132. } \
  133. return ret; \
  134. }
  135. #define FUNCRIDTEX2(m_type, m_type1, m_type2) \
  136. virtual RID m_type##_create(m_type1 p1, m_type2 p2) override { \
  137. RID ret = RSG::storage->texture_allocate(); \
  138. if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
  139. RSG::storage->m_type##_initialize(ret, p1, p2); \
  140. } else { \
  141. command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret, p1, p2); \
  142. } \
  143. return ret; \
  144. }
  145. #define FUNCRIDTEX6(m_type, m_type1, m_type2, m_type3, m_type4, m_type5, m_type6) \
  146. virtual RID m_type##_create(m_type1 p1, m_type2 p2, m_type3 p3, m_type4 p4, m_type5 p5, m_type6 p6) override { \
  147. RID ret = RSG::storage->texture_allocate(); \
  148. if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) { \
  149. RSG::storage->m_type##_initialize(ret, p1, p2, p3, p4, p5, p6); \
  150. } else { \
  151. command_queue.push(RSG::storage, &RendererStorage::m_type##_initialize, ret, p1, p2, p3, p4, p5, p6); \
  152. } \
  153. return ret; \
  154. }
  155. //these go pass-through, as they can be called from any thread
  156. FUNCRIDTEX1(texture_2d, const Ref<Image> &)
  157. FUNCRIDTEX2(texture_2d_layered, const Vector<Ref<Image>> &, TextureLayeredType)
  158. FUNCRIDTEX6(texture_3d, Image::Format, int, int, int, bool, const Vector<Ref<Image>> &)
  159. FUNCRIDTEX1(texture_proxy, RID)
  160. //goes pass-through
  161. FUNC3(texture_2d_update_immediate, RID, const Ref<Image> &, int)
  162. //these go through command queue if they are in another thread
  163. FUNC3(texture_2d_update, RID, const Ref<Image> &, int)
  164. FUNC2(texture_3d_update, RID, const Vector<Ref<Image>> &)
  165. FUNC2(texture_proxy_update, RID, RID)
  166. //these also go pass-through
  167. FUNCRIDTEX0(texture_2d_placeholder)
  168. FUNCRIDTEX1(texture_2d_layered_placeholder, TextureLayeredType)
  169. FUNCRIDTEX0(texture_3d_placeholder)
  170. FUNC1RC(Ref<Image>, texture_2d_get, RID)
  171. FUNC2RC(Ref<Image>, texture_2d_layer_get, RID, int)
  172. FUNC1RC(Vector<Ref<Image>>, texture_3d_get, RID)
  173. FUNC2(texture_replace, RID, RID)
  174. FUNC3(texture_set_size_override, RID, int, int)
  175. // FIXME: Disabled during Vulkan refactoring, should be ported.
  176. #if 0
  177. FUNC2(texture_bind, RID, uint32_t)
  178. #endif
  179. FUNC3(texture_set_detect_3d_callback, RID, TextureDetectCallback, void *)
  180. FUNC3(texture_set_detect_normal_callback, RID, TextureDetectCallback, void *)
  181. FUNC3(texture_set_detect_roughness_callback, RID, TextureDetectRoughnessCallback, void *)
  182. FUNC2(texture_set_path, RID, const String &)
  183. FUNC1RC(String, texture_get_path, RID)
  184. FUNC1(texture_debug_usage, List<TextureInfo> *)
  185. FUNC2(texture_set_force_redraw_if_visible, RID, bool)
  186. /* SHADER API */
  187. FUNCRIDSPLIT(shader)
  188. FUNC2(shader_set_code, RID, const String &)
  189. FUNC1RC(String, shader_get_code, RID)
  190. FUNC2SC(shader_get_param_list, RID, List<PropertyInfo> *)
  191. FUNC3(shader_set_default_texture_param, RID, const StringName &, RID)
  192. FUNC2RC(RID, shader_get_default_texture_param, RID, const StringName &)
  193. FUNC2RC(Variant, shader_get_param_default, RID, const StringName &)
  194. FUNC1RC(ShaderNativeSourceCode, shader_get_native_source_code, RID)
  195. /* COMMON MATERIAL API */
  196. FUNCRIDSPLIT(material)
  197. FUNC2(material_set_shader, RID, RID)
  198. FUNC3(material_set_param, RID, const StringName &, const Variant &)
  199. FUNC2RC(Variant, material_get_param, RID, const StringName &)
  200. FUNC2(material_set_render_priority, RID, int)
  201. FUNC2(material_set_next_pass, RID, RID)
  202. /* MESH API */
  203. virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces, int p_blend_shape_count = 0) override {
  204. RID mesh = RSG::storage->mesh_allocate();
  205. if (Thread::get_caller_id() == server_thread || RSG::storage->can_create_resources_async()) {
  206. if (Thread::get_caller_id() == server_thread) {
  207. command_queue.flush_if_pending();
  208. }
  209. RSG::storage->mesh_initialize(mesh);
  210. RSG::storage->mesh_set_blend_shape_count(mesh, p_blend_shape_count);
  211. for (int i = 0; i < p_surfaces.size(); i++) {
  212. RSG::storage->mesh_add_surface(mesh, p_surfaces[i]);
  213. }
  214. } else {
  215. command_queue.push(RSG::storage, &RendererStorage::mesh_initialize, mesh);
  216. command_queue.push(RSG::storage, &RendererStorage::mesh_set_blend_shape_count, mesh, p_blend_shape_count);
  217. for (int i = 0; i < p_surfaces.size(); i++) {
  218. RSG::storage->mesh_add_surface(mesh, p_surfaces[i]);
  219. command_queue.push(RSG::storage, &RendererStorage::mesh_add_surface, mesh, p_surfaces[i]);
  220. }
  221. }
  222. return mesh;
  223. }
  224. FUNC2(mesh_set_blend_shape_count, RID, int)
  225. FUNCRIDSPLIT(mesh)
  226. FUNC2(mesh_add_surface, RID, const SurfaceData &)
  227. FUNC1RC(int, mesh_get_blend_shape_count, RID)
  228. FUNC2(mesh_set_blend_shape_mode, RID, BlendShapeMode)
  229. FUNC1RC(BlendShapeMode, mesh_get_blend_shape_mode, RID)
  230. FUNC4(mesh_surface_update_region, RID, int, int, const Vector<uint8_t> &)
  231. FUNC3(mesh_surface_set_material, RID, int, RID)
  232. FUNC2RC(RID, mesh_surface_get_material, RID, int)
  233. FUNC2RC(SurfaceData, mesh_get_surface, RID, int)
  234. FUNC1RC(int, mesh_get_surface_count, RID)
  235. FUNC2(mesh_set_custom_aabb, RID, const AABB &)
  236. FUNC1RC(AABB, mesh_get_custom_aabb, RID)
  237. FUNC2(mesh_set_shadow_mesh, RID, RID)
  238. FUNC1(mesh_clear, RID)
  239. /* MULTIMESH API */
  240. FUNCRIDSPLIT(multimesh)
  241. FUNC5(multimesh_allocate_data, RID, int, MultimeshTransformFormat, bool, bool)
  242. FUNC1RC(int, multimesh_get_instance_count, RID)
  243. FUNC2(multimesh_set_mesh, RID, RID)
  244. FUNC3(multimesh_instance_set_transform, RID, int, const Transform3D &)
  245. FUNC3(multimesh_instance_set_transform_2d, RID, int, const Transform2D &)
  246. FUNC3(multimesh_instance_set_color, RID, int, const Color &)
  247. FUNC3(multimesh_instance_set_custom_data, RID, int, const Color &)
  248. FUNC1RC(RID, multimesh_get_mesh, RID)
  249. FUNC1RC(AABB, multimesh_get_aabb, RID)
  250. FUNC2RC(Transform3D, multimesh_instance_get_transform, RID, int)
  251. FUNC2RC(Transform2D, multimesh_instance_get_transform_2d, RID, int)
  252. FUNC2RC(Color, multimesh_instance_get_color, RID, int)
  253. FUNC2RC(Color, multimesh_instance_get_custom_data, RID, int)
  254. FUNC2(multimesh_set_buffer, RID, const Vector<float> &)
  255. FUNC1RC(Vector<float>, multimesh_get_buffer, RID)
  256. FUNC2(multimesh_set_visible_instances, RID, int)
  257. FUNC1RC(int, multimesh_get_visible_instances, RID)
  258. /* IMMEDIATE API */
  259. FUNCRIDSPLIT(immediate)
  260. FUNC3(immediate_begin, RID, PrimitiveType, RID)
  261. FUNC2(immediate_vertex, RID, const Vector3 &)
  262. FUNC2(immediate_normal, RID, const Vector3 &)
  263. FUNC2(immediate_tangent, RID, const Plane &)
  264. FUNC2(immediate_color, RID, const Color &)
  265. FUNC2(immediate_uv, RID, const Vector2 &)
  266. FUNC2(immediate_uv2, RID, const Vector2 &)
  267. FUNC1(immediate_end, RID)
  268. FUNC1(immediate_clear, RID)
  269. FUNC2(immediate_set_material, RID, RID)
  270. FUNC1RC(RID, immediate_get_material, RID)
  271. /* SKELETON API */
  272. FUNCRIDSPLIT(skeleton)
  273. FUNC3(skeleton_allocate_data, RID, int, bool)
  274. FUNC1RC(int, skeleton_get_bone_count, RID)
  275. FUNC3(skeleton_bone_set_transform, RID, int, const Transform3D &)
  276. FUNC2RC(Transform3D, skeleton_bone_get_transform, RID, int)
  277. FUNC3(skeleton_bone_set_transform_2d, RID, int, const Transform2D &)
  278. FUNC2RC(Transform2D, skeleton_bone_get_transform_2d, RID, int)
  279. FUNC2(skeleton_set_base_transform_2d, RID, const Transform2D &)
  280. /* Light API */
  281. FUNCRIDSPLIT(directional_light)
  282. FUNCRIDSPLIT(omni_light)
  283. FUNCRIDSPLIT(spot_light)
  284. FUNC2(light_set_color, RID, const Color &)
  285. FUNC3(light_set_param, RID, LightParam, float)
  286. FUNC2(light_set_shadow, RID, bool)
  287. FUNC2(light_set_shadow_color, RID, const Color &)
  288. FUNC2(light_set_projector, RID, RID)
  289. FUNC2(light_set_negative, RID, bool)
  290. FUNC2(light_set_cull_mask, RID, uint32_t)
  291. FUNC2(light_set_reverse_cull_face_mode, RID, bool)
  292. FUNC2(light_set_bake_mode, RID, LightBakeMode)
  293. FUNC2(light_set_max_sdfgi_cascade, RID, uint32_t)
  294. FUNC2(light_omni_set_shadow_mode, RID, LightOmniShadowMode)
  295. FUNC2(light_directional_set_shadow_mode, RID, LightDirectionalShadowMode)
  296. FUNC2(light_directional_set_blend_splits, RID, bool)
  297. FUNC2(light_directional_set_sky_only, RID, bool)
  298. FUNC2(light_directional_set_shadow_depth_range_mode, RID, LightDirectionalShadowDepthRangeMode)
  299. /* PROBE API */
  300. FUNCRIDSPLIT(reflection_probe)
  301. FUNC2(reflection_probe_set_update_mode, RID, ReflectionProbeUpdateMode)
  302. FUNC2(reflection_probe_set_intensity, RID, float)
  303. FUNC2(reflection_probe_set_ambient_color, RID, const Color &)
  304. FUNC2(reflection_probe_set_ambient_energy, RID, float)
  305. FUNC2(reflection_probe_set_ambient_mode, RID, ReflectionProbeAmbientMode)
  306. FUNC2(reflection_probe_set_max_distance, RID, float)
  307. FUNC2(reflection_probe_set_extents, RID, const Vector3 &)
  308. FUNC2(reflection_probe_set_origin_offset, RID, const Vector3 &)
  309. FUNC2(reflection_probe_set_as_interior, RID, bool)
  310. FUNC2(reflection_probe_set_enable_box_projection, RID, bool)
  311. FUNC2(reflection_probe_set_enable_shadows, RID, bool)
  312. FUNC2(reflection_probe_set_cull_mask, RID, uint32_t)
  313. FUNC2(reflection_probe_set_resolution, RID, int)
  314. FUNC2(reflection_probe_set_lod_threshold, RID, float)
  315. /* DECAL API */
  316. FUNCRIDSPLIT(decal)
  317. FUNC2(decal_set_extents, RID, const Vector3 &)
  318. FUNC3(decal_set_texture, RID, DecalTexture, RID)
  319. FUNC2(decal_set_emission_energy, RID, float)
  320. FUNC2(decal_set_albedo_mix, RID, float)
  321. FUNC2(decal_set_modulate, RID, const Color &)
  322. FUNC2(decal_set_cull_mask, RID, uint32_t)
  323. FUNC4(decal_set_distance_fade, RID, bool, float, float)
  324. FUNC3(decal_set_fade, RID, float, float)
  325. FUNC2(decal_set_normal_fade, RID, float)
  326. /* BAKED LIGHT API */
  327. FUNCRIDSPLIT(voxel_gi)
  328. FUNC8(voxel_gi_allocate_data, RID, const Transform3D &, const AABB &, const Vector3i &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<uint8_t> &, const Vector<int> &)
  329. FUNC1RC(AABB, voxel_gi_get_bounds, RID)
  330. FUNC1RC(Vector3i, voxel_gi_get_octree_size, RID)
  331. FUNC1RC(Vector<uint8_t>, voxel_gi_get_octree_cells, RID)
  332. FUNC1RC(Vector<uint8_t>, voxel_gi_get_data_cells, RID)
  333. FUNC1RC(Vector<uint8_t>, voxel_gi_get_distance_field, RID)
  334. FUNC1RC(Vector<int>, voxel_gi_get_level_counts, RID)
  335. FUNC1RC(Transform3D, voxel_gi_get_to_cell_xform, RID)
  336. FUNC2(voxel_gi_set_dynamic_range, RID, float)
  337. FUNC1RC(float, voxel_gi_get_dynamic_range, RID)
  338. FUNC2(voxel_gi_set_propagation, RID, float)
  339. FUNC1RC(float, voxel_gi_get_propagation, RID)
  340. FUNC2(voxel_gi_set_energy, RID, float)
  341. FUNC1RC(float, voxel_gi_get_energy, RID)
  342. FUNC2(voxel_gi_set_ao, RID, float)
  343. FUNC1RC(float, voxel_gi_get_ao, RID)
  344. FUNC2(voxel_gi_set_ao_size, RID, float)
  345. FUNC1RC(float, voxel_gi_get_ao_size, RID)
  346. FUNC2(voxel_gi_set_bias, RID, float)
  347. FUNC1RC(float, voxel_gi_get_bias, RID)
  348. FUNC2(voxel_gi_set_normal_bias, RID, float)
  349. FUNC1RC(float, voxel_gi_get_normal_bias, RID)
  350. FUNC2(voxel_gi_set_interior, RID, bool)
  351. FUNC1RC(bool, voxel_gi_is_interior, RID)
  352. FUNC2(voxel_gi_set_use_two_bounces, RID, bool)
  353. FUNC1RC(bool, voxel_gi_is_using_two_bounces, RID)
  354. FUNC2(voxel_gi_set_anisotropy_strength, RID, float)
  355. FUNC1RC(float, voxel_gi_get_anisotropy_strength, RID)
  356. /* LIGHTMAP */
  357. FUNCRIDSPLIT(lightmap)
  358. FUNC3(lightmap_set_textures, RID, RID, bool)
  359. FUNC2(lightmap_set_probe_bounds, RID, const AABB &)
  360. FUNC2(lightmap_set_probe_interior, RID, bool)
  361. FUNC5(lightmap_set_probe_capture_data, RID, const PackedVector3Array &, const PackedColorArray &, const PackedInt32Array &, const PackedInt32Array &)
  362. FUNC1RC(PackedVector3Array, lightmap_get_probe_capture_points, RID)
  363. FUNC1RC(PackedColorArray, lightmap_get_probe_capture_sh, RID)
  364. FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_tetrahedra, RID)
  365. FUNC1RC(PackedInt32Array, lightmap_get_probe_capture_bsp_tree, RID)
  366. FUNC1(lightmap_set_probe_capture_update_speed, float)
  367. /* PARTICLES */
  368. FUNCRIDSPLIT(particles)
  369. FUNC2(particles_set_mode, RID, ParticlesMode)
  370. FUNC2(particles_set_emitting, RID, bool)
  371. FUNC1R(bool, particles_get_emitting, RID)
  372. FUNC2(particles_set_amount, RID, int)
  373. FUNC2(particles_set_lifetime, RID, float)
  374. FUNC2(particles_set_one_shot, RID, bool)
  375. FUNC2(particles_set_pre_process_time, RID, float)
  376. FUNC2(particles_set_explosiveness_ratio, RID, float)
  377. FUNC2(particles_set_randomness_ratio, RID, float)
  378. FUNC2(particles_set_custom_aabb, RID, const AABB &)
  379. FUNC2(particles_set_speed_scale, RID, float)
  380. FUNC2(particles_set_use_local_coordinates, RID, bool)
  381. FUNC2(particles_set_process_material, RID, RID)
  382. FUNC2(particles_set_fixed_fps, RID, int)
  383. FUNC2(particles_set_interpolate, RID, bool)
  384. FUNC2(particles_set_fractional_delta, RID, bool)
  385. FUNC1R(bool, particles_is_inactive, RID)
  386. FUNC3(particles_set_trails, RID, bool, float)
  387. FUNC2(particles_set_trail_bind_poses, RID, const Vector<Transform3D> &)
  388. FUNC1(particles_request_process, RID)
  389. FUNC1(particles_restart, RID)
  390. FUNC6(particles_emit, RID, const Transform3D &, const Vector3 &, const Color &, const Color &, uint32_t)
  391. FUNC2(particles_set_subemitter, RID, RID)
  392. FUNC2(particles_set_collision_base_size, RID, float)
  393. FUNC2(particles_set_transform_align, RID, RS::ParticlesTransformAlign)
  394. FUNC2(particles_set_draw_order, RID, RS::ParticlesDrawOrder)
  395. FUNC2(particles_set_draw_passes, RID, int)
  396. FUNC3(particles_set_draw_pass_mesh, RID, int, RID)
  397. FUNC1R(AABB, particles_get_current_aabb, RID)
  398. FUNC2(particles_set_emission_transform, RID, const Transform3D &)
  399. /* PARTICLES COLLISION */
  400. FUNCRIDSPLIT(particles_collision)
  401. FUNC2(particles_collision_set_collision_type, RID, ParticlesCollisionType)
  402. FUNC2(particles_collision_set_cull_mask, RID, uint32_t)
  403. FUNC2(particles_collision_set_sphere_radius, RID, float)
  404. FUNC2(particles_collision_set_box_extents, RID, const Vector3 &)
  405. FUNC2(particles_collision_set_attractor_strength, RID, float)
  406. FUNC2(particles_collision_set_attractor_directionality, RID, float)
  407. FUNC2(particles_collision_set_attractor_attenuation, RID, float)
  408. FUNC2(particles_collision_set_field_texture, RID, RID)
  409. FUNC1(particles_collision_height_field_update, RID)
  410. FUNC2(particles_collision_set_height_field_resolution, RID, ParticlesCollisionHeightfieldResolution)
  411. /* VISIBILITY_NOTIFIER */
  412. FUNCRIDSPLIT(visibility_notifier)
  413. FUNC2(visibility_notifier_set_aabb, RID, const AABB &)
  414. FUNC3(visibility_notifier_set_callbacks, RID, const Callable &, const Callable &)
  415. #undef server_name
  416. #undef ServerName
  417. //from now on, calls forwarded to this singleton
  418. #define ServerName RendererScene
  419. #define server_name RSG::scene
  420. /* CAMERA API */
  421. FUNCRIDSPLIT(camera)
  422. FUNC4(camera_set_perspective, RID, float, float, float)
  423. FUNC4(camera_set_orthogonal, RID, float, float, float)
  424. FUNC5(camera_set_frustum, RID, float, Vector2, float, float)
  425. FUNC2(camera_set_transform, RID, const Transform3D &)
  426. FUNC2(camera_set_cull_mask, RID, uint32_t)
  427. FUNC2(camera_set_environment, RID, RID)
  428. FUNC2(camera_set_camera_effects, RID, RID)
  429. FUNC2(camera_set_use_vertical_aspect, RID, bool)
  430. /* OCCLUDER */
  431. FUNCRIDSPLIT(occluder)
  432. FUNC3(occluder_set_mesh, RID, const PackedVector3Array &, const PackedInt32Array &)
  433. #undef server_name
  434. #undef ServerName
  435. //from now on, calls forwarded to this singleton
  436. #define ServerName RendererViewport
  437. #define server_name RSG::viewport
  438. /* VIEWPORT TARGET API */
  439. FUNCRIDSPLIT(viewport)
  440. FUNC2(viewport_set_use_xr, RID, bool)
  441. FUNC3(viewport_set_size, RID, int, int)
  442. FUNC2(viewport_set_active, RID, bool)
  443. FUNC2(viewport_set_parent_viewport, RID, RID)
  444. FUNC2(viewport_set_clear_mode, RID, ViewportClearMode)
  445. FUNC3(viewport_attach_to_screen, RID, const Rect2 &, int)
  446. FUNC2(viewport_set_render_direct_to_screen, RID, bool)
  447. FUNC2(viewport_set_update_mode, RID, ViewportUpdateMode)
  448. FUNC1RC(RID, viewport_get_texture, RID)
  449. FUNC2(viewport_set_hide_scenario, RID, bool)
  450. FUNC2(viewport_set_hide_canvas, RID, bool)
  451. FUNC2(viewport_set_disable_environment, RID, bool)
  452. FUNC2(viewport_set_disable_3d, RID, bool)
  453. FUNC2(viewport_attach_camera, RID, RID)
  454. FUNC2(viewport_set_scenario, RID, RID)
  455. FUNC2(viewport_attach_canvas, RID, RID)
  456. FUNC2(viewport_remove_canvas, RID, RID)
  457. FUNC3(viewport_set_canvas_transform, RID, RID, const Transform2D &)
  458. FUNC2(viewport_set_transparent_background, RID, bool)
  459. FUNC2(viewport_set_snap_2d_transforms_to_pixel, RID, bool)
  460. FUNC2(viewport_set_snap_2d_vertices_to_pixel, RID, bool)
  461. FUNC2(viewport_set_default_canvas_item_texture_filter, RID, CanvasItemTextureFilter)
  462. FUNC2(viewport_set_default_canvas_item_texture_repeat, RID, CanvasItemTextureRepeat)
  463. FUNC2(viewport_set_global_canvas_transform, RID, const Transform2D &)
  464. FUNC4(viewport_set_canvas_stacking, RID, RID, int, int)
  465. FUNC3(viewport_set_shadow_atlas_size, RID, int, bool)
  466. FUNC3(viewport_set_sdf_oversize_and_scale, RID, ViewportSDFOversize, ViewportSDFScale)
  467. FUNC3(viewport_set_shadow_atlas_quadrant_subdivision, RID, int, int)
  468. FUNC2(viewport_set_msaa, RID, ViewportMSAA)
  469. FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
  470. FUNC2(viewport_set_use_debanding, RID, bool)
  471. FUNC2(viewport_set_use_occlusion_culling, RID, bool)
  472. FUNC1(viewport_set_occlusion_rays_per_thread, int)
  473. FUNC1(viewport_set_occlusion_culling_build_quality, ViewportOcclusionCullingBuildQuality)
  474. FUNC2(viewport_set_lod_threshold, RID, float)
  475. FUNC2R(int, viewport_get_render_info, RID, ViewportRenderInfo)
  476. FUNC2(viewport_set_debug_draw, RID, ViewportDebugDraw)
  477. FUNC2(viewport_set_measure_render_time, RID, bool)
  478. FUNC1RC(float, viewport_get_measured_render_time_cpu, RID)
  479. FUNC1RC(float, viewport_get_measured_render_time_gpu, RID)
  480. FUNC1(call_set_use_vsync, bool)
  481. /* ENVIRONMENT API */
  482. #undef server_name
  483. #undef ServerName
  484. //from now on, calls forwarded to this singleton
  485. #define ServerName RendererScene
  486. #define server_name RSG::scene
  487. FUNC2(directional_shadow_atlas_set_size, int, bool)
  488. FUNC1(voxel_gi_set_quality, VoxelGIQuality)
  489. /* SKY API */
  490. FUNCRIDSPLIT(sky)
  491. FUNC2(sky_set_radiance_size, RID, int)
  492. FUNC2(sky_set_mode, RID, SkyMode)
  493. FUNC2(sky_set_material, RID, RID)
  494. FUNC4R(Ref<Image>, sky_bake_panorama, RID, float, bool, const Size2i &)
  495. FUNCRIDSPLIT(environment)
  496. FUNC2(environment_set_background, RID, EnvironmentBG)
  497. FUNC2(environment_set_sky, RID, RID)
  498. FUNC2(environment_set_sky_custom_fov, RID, float)
  499. FUNC2(environment_set_sky_orientation, RID, const Basis &)
  500. FUNC2(environment_set_bg_color, RID, const Color &)
  501. FUNC2(environment_set_bg_energy, RID, float)
  502. FUNC2(environment_set_canvas_max_layer, RID, int)
  503. FUNC7(environment_set_ambient_light, RID, const Color &, EnvironmentAmbientSource, float, float, EnvironmentReflectionSource, const Color &)
  504. // FIXME: Disabled during Vulkan refactoring, should be ported.
  505. #if 0
  506. FUNC2(environment_set_camera_feed_id, RID, int)
  507. #endif
  508. FUNC6(environment_set_ssr, RID, bool, int, float, float, float)
  509. FUNC1(environment_set_ssr_roughness_quality, EnvironmentSSRRoughnessQuality)
  510. FUNC10(environment_set_ssao, RID, bool, float, float, float, float, float, float, float, float)
  511. FUNC6(environment_set_ssao_quality, EnvironmentSSAOQuality, bool, float, int, float, float)
  512. FUNC11(environment_set_glow, RID, bool, Vector<float>, float, float, float, float, EnvironmentGlowBlendMode, float, float, float)
  513. FUNC1(environment_glow_set_use_bicubic_upscale, bool)
  514. FUNC1(environment_glow_set_use_high_quality, bool)
  515. FUNC9(environment_set_tonemap, RID, EnvironmentToneMapper, float, float, bool, float, float, float, float)
  516. FUNC7(environment_set_adjustment, RID, bool, float, float, float, bool, RID)
  517. FUNC9(environment_set_fog, RID, bool, const Color &, float, float, float, float, float, float)
  518. FUNC10(environment_set_volumetric_fog, RID, bool, float, const Color &, float, float, float, float, bool, float)
  519. FUNC2(environment_set_volumetric_fog_volume_size, int, int)
  520. FUNC1(environment_set_volumetric_fog_filter_active, bool)
  521. FUNC11(environment_set_sdfgi, RID, bool, EnvironmentSDFGICascades, float, EnvironmentSDFGIYScale, bool, float, bool, float, float, float)
  522. FUNC1(environment_set_sdfgi_ray_count, EnvironmentSDFGIRayCount)
  523. FUNC1(environment_set_sdfgi_frames_to_converge, EnvironmentSDFGIFramesToConverge)
  524. FUNC1(environment_set_sdfgi_frames_to_update_light, EnvironmentSDFGIFramesToUpdateLight)
  525. FUNC3R(Ref<Image>, environment_bake_panorama, RID, bool, const Size2i &)
  526. FUNC3(screen_space_roughness_limiter_set_active, bool, float, float)
  527. FUNC1(sub_surface_scattering_set_quality, SubSurfaceScatteringQuality)
  528. FUNC2(sub_surface_scattering_set_scale, float, float)
  529. /* CAMERA EFFECTS */
  530. FUNCRIDSPLIT(camera_effects)
  531. FUNC2(camera_effects_set_dof_blur_quality, DOFBlurQuality, bool)
  532. FUNC1(camera_effects_set_dof_blur_bokeh_shape, DOFBokehShape)
  533. FUNC8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
  534. FUNC3(camera_effects_set_custom_exposure, RID, bool, float)
  535. FUNC1(shadows_quality_set, ShadowQuality);
  536. FUNC1(directional_shadow_quality_set, ShadowQuality);
  537. /* SCENARIO API */
  538. #undef server_name
  539. #undef ServerName
  540. #define ServerName RendererScene
  541. #define server_name RSG::scene
  542. FUNCRIDSPLIT(scenario)
  543. FUNC2(scenario_set_debug, RID, ScenarioDebugMode)
  544. FUNC2(scenario_set_environment, RID, RID)
  545. FUNC2(scenario_set_camera_effects, RID, RID)
  546. FUNC2(scenario_set_fallback_environment, RID, RID)
  547. /* INSTANCING API */
  548. FUNCRIDSPLIT(instance)
  549. FUNC2(instance_set_base, RID, RID)
  550. FUNC2(instance_set_scenario, RID, RID)
  551. FUNC2(instance_set_layer_mask, RID, uint32_t)
  552. FUNC2(instance_set_transform, RID, const Transform3D &)
  553. FUNC2(instance_attach_object_instance_id, RID, ObjectID)
  554. FUNC3(instance_set_blend_shape_weight, RID, int, float)
  555. FUNC3(instance_set_surface_override_material, RID, int, RID)
  556. FUNC2(instance_set_visible, RID, bool)
  557. FUNC2(instance_set_custom_aabb, RID, AABB)
  558. FUNC2(instance_attach_skeleton, RID, RID)
  559. FUNC2(instance_set_exterior, RID, bool)
  560. FUNC2(instance_set_extra_visibility_margin, RID, real_t)
  561. FUNC2(instance_set_visibility_parent, RID, RID)
  562. // don't use these in a game!
  563. FUNC2RC(Vector<ObjectID>, instances_cull_aabb, const AABB &, RID)
  564. FUNC3RC(Vector<ObjectID>, instances_cull_ray, const Vector3 &, const Vector3 &, RID)
  565. FUNC2RC(Vector<ObjectID>, instances_cull_convex, const Vector<Plane> &, RID)
  566. FUNC3(instance_geometry_set_flag, RID, InstanceFlags, bool)
  567. FUNC2(instance_geometry_set_cast_shadows_setting, RID, ShadowCastingSetting)
  568. FUNC2(instance_geometry_set_material_override, RID, RID)
  569. FUNC5(instance_geometry_set_visibility_range, RID, float, float, float, float)
  570. FUNC4(instance_geometry_set_lightmap, RID, RID, const Rect2 &, int)
  571. FUNC2(instance_geometry_set_lod_bias, RID, float)
  572. FUNC3(instance_geometry_set_shader_parameter, RID, const StringName &, const Variant &)
  573. FUNC2RC(Variant, instance_geometry_get_shader_parameter, RID, const StringName &)
  574. FUNC2RC(Variant, instance_geometry_get_shader_parameter_default_value, RID, const StringName &)
  575. FUNC2C(instance_geometry_get_shader_parameter_list, RID, List<PropertyInfo> *)
  576. FUNC3R(TypedArray<Image>, bake_render_uv2, RID, const Vector<RID> &, const Size2i &)
  577. FUNC1(gi_set_use_half_resolution, bool)
  578. #undef server_name
  579. #undef ServerName
  580. //from now on, calls forwarded to this singleton
  581. #define ServerName RendererCanvasCull
  582. #define server_name RSG::canvas
  583. /* CANVAS (2D) */
  584. FUNCRIDSPLIT(canvas)
  585. FUNC3(canvas_set_item_mirroring, RID, RID, const Point2 &)
  586. FUNC2(canvas_set_modulate, RID, const Color &)
  587. FUNC3(canvas_set_parent, RID, RID, float)
  588. FUNC1(canvas_set_disable_scale, bool)
  589. FUNCRIDSPLIT(canvas_texture)
  590. FUNC3(canvas_texture_set_channel, RID, CanvasTextureChannel, RID)
  591. FUNC3(canvas_texture_set_shading_parameters, RID, const Color &, float)
  592. FUNC2(canvas_texture_set_texture_filter, RID, CanvasItemTextureFilter)
  593. FUNC2(canvas_texture_set_texture_repeat, RID, CanvasItemTextureRepeat)
  594. FUNCRIDSPLIT(canvas_item)
  595. FUNC2(canvas_item_set_parent, RID, RID)
  596. FUNC2(canvas_item_set_default_texture_filter, RID, CanvasItemTextureFilter)
  597. FUNC2(canvas_item_set_default_texture_repeat, RID, CanvasItemTextureRepeat)
  598. FUNC2(canvas_item_set_visible, RID, bool)
  599. FUNC2(canvas_item_set_light_mask, RID, int)
  600. FUNC2(canvas_item_set_update_when_visible, RID, bool)
  601. FUNC2(canvas_item_set_transform, RID, const Transform2D &)
  602. FUNC2(canvas_item_set_clip, RID, bool)
  603. FUNC2(canvas_item_set_distance_field_mode, RID, bool)
  604. FUNC3(canvas_item_set_custom_rect, RID, bool, const Rect2 &)
  605. FUNC2(canvas_item_set_modulate, RID, const Color &)
  606. FUNC2(canvas_item_set_self_modulate, RID, const Color &)
  607. FUNC2(canvas_item_set_draw_behind_parent, RID, bool)
  608. FUNC5(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float)
  609. FUNC5(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool)
  610. FUNC4(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float)
  611. FUNC3(canvas_item_add_rect, RID, const Rect2 &, const Color &)
  612. FUNC4(canvas_item_add_circle, RID, const Point2 &, float, const Color &)
  613. FUNC6(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool)
  614. FUNC7(canvas_item_add_texture_rect_region, RID, const Rect2 &, RID, const Rect2 &, const Color &, bool, bool)
  615. FUNC10(canvas_item_add_nine_patch, RID, const Rect2 &, const Rect2 &, RID, const Vector2 &, const Vector2 &, NinePatchAxisMode, NinePatchAxisMode, bool, const Color &)
  616. FUNC6(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float)
  617. FUNC5(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID)
  618. FUNC9(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)
  619. FUNC5(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID)
  620. FUNC3(canvas_item_add_multimesh, RID, RID, RID)
  621. FUNC3(canvas_item_add_particles, RID, RID, RID)
  622. FUNC2(canvas_item_add_set_transform, RID, const Transform2D &)
  623. FUNC2(canvas_item_add_clip_ignore, RID, bool)
  624. FUNC5(canvas_item_add_animation_slice, RID, double, double, double, double)
  625. FUNC2(canvas_item_set_sort_children_by_y, RID, bool)
  626. FUNC2(canvas_item_set_z_index, RID, int)
  627. FUNC2(canvas_item_set_z_as_relative_to_parent, RID, bool)
  628. FUNC3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &)
  629. FUNC2(canvas_item_attach_skeleton, RID, RID)
  630. FUNC1(canvas_item_clear, RID)
  631. FUNC2(canvas_item_set_draw_index, RID, int)
  632. FUNC2(canvas_item_set_material, RID, RID)
  633. FUNC2(canvas_item_set_use_parent_material, RID, bool)
  634. FUNC5(canvas_item_set_visibility_notifier, RID, bool, const Rect2 &, const Callable &, const Callable &)
  635. FUNC6(canvas_item_set_canvas_group_mode, RID, CanvasGroupMode, float, bool, float, bool)
  636. FUNCRIDSPLIT(canvas_light)
  637. FUNC2(canvas_light_set_mode, RID, CanvasLightMode)
  638. FUNC2(canvas_light_attach_to_canvas, RID, RID)
  639. FUNC2(canvas_light_set_enabled, RID, bool)
  640. FUNC2(canvas_light_set_texture_scale, RID, float)
  641. FUNC2(canvas_light_set_transform, RID, const Transform2D &)
  642. FUNC2(canvas_light_set_texture, RID, RID)
  643. FUNC2(canvas_light_set_texture_offset, RID, const Vector2 &)
  644. FUNC2(canvas_light_set_color, RID, const Color &)
  645. FUNC2(canvas_light_set_height, RID, float)
  646. FUNC2(canvas_light_set_energy, RID, float)
  647. FUNC3(canvas_light_set_z_range, RID, int, int)
  648. FUNC3(canvas_light_set_layer_range, RID, int, int)
  649. FUNC2(canvas_light_set_item_cull_mask, RID, int)
  650. FUNC2(canvas_light_set_item_shadow_cull_mask, RID, int)
  651. FUNC2(canvas_light_set_directional_distance, RID, float)
  652. FUNC2(canvas_light_set_blend_mode, RID, CanvasLightBlendMode)
  653. FUNC2(canvas_light_set_shadow_enabled, RID, bool)
  654. FUNC2(canvas_light_set_shadow_filter, RID, CanvasLightShadowFilter)
  655. FUNC2(canvas_light_set_shadow_color, RID, const Color &)
  656. FUNC2(canvas_light_set_shadow_smooth, RID, float)
  657. FUNCRIDSPLIT(canvas_light_occluder)
  658. FUNC2(canvas_light_occluder_attach_to_canvas, RID, RID)
  659. FUNC2(canvas_light_occluder_set_enabled, RID, bool)
  660. FUNC2(canvas_light_occluder_set_polygon, RID, RID)
  661. FUNC2(canvas_light_occluder_set_as_sdf_collision, RID, bool)
  662. FUNC2(canvas_light_occluder_set_transform, RID, const Transform2D &)
  663. FUNC2(canvas_light_occluder_set_light_mask, RID, int)
  664. FUNCRIDSPLIT(canvas_occluder_polygon)
  665. FUNC3(canvas_occluder_polygon_set_shape, RID, const Vector<Vector2> &, bool)
  666. FUNC2(canvas_occluder_polygon_set_cull_mode, RID, CanvasOccluderPolygonCullMode)
  667. FUNC1(canvas_set_shadow_texture_size, int)
  668. /* GLOBAL VARIABLES */
  669. #undef server_name
  670. #undef ServerName
  671. //from now on, calls forwarded to this singleton
  672. #define ServerName RendererStorage
  673. #define server_name RSG::storage
  674. FUNC3(global_variable_add, const StringName &, GlobalVariableType, const Variant &)
  675. FUNC1(global_variable_remove, const StringName &)
  676. FUNC0RC(Vector<StringName>, global_variable_get_list)
  677. FUNC2(global_variable_set, const StringName &, const Variant &)
  678. FUNC2(global_variable_set_override, const StringName &, const Variant &)
  679. FUNC1RC(GlobalVariableType, global_variable_get_type, const StringName &)
  680. FUNC1RC(Variant, global_variable_get, const StringName &)
  681. FUNC1(global_variables_load_settings, bool)
  682. FUNC0(global_variables_clear)
  683. #undef server_name
  684. #undef ServerName
  685. #undef WRITE_ACTION
  686. #undef SYNC_DEBUG
  687. /* BLACK BARS */
  688. virtual void black_bars_set_margins(int p_left, int p_top, int p_right, int p_bottom) override;
  689. virtual void black_bars_set_images(RID p_left, RID p_top, RID p_right, RID p_bottom) override;
  690. /* FREE */
  691. virtual void free(RID p_rid) override {
  692. if (Thread::get_caller_id() == server_thread) {
  693. command_queue.flush_if_pending();
  694. _free(p_rid);
  695. } else {
  696. command_queue.push(this, &RenderingServerDefault::_free, p_rid);
  697. }
  698. }
  699. /* EVENT QUEUING */
  700. virtual void request_frame_drawn_callback(Object *p_where, const StringName &p_method, const Variant &p_userdata) override;
  701. virtual void draw(bool p_swap_buffers, double frame_step) override;
  702. virtual void sync() override;
  703. virtual bool has_changed() const override;
  704. virtual void init() override;
  705. virtual void finish() override;
  706. /* STATUS INFORMATION */
  707. virtual uint64_t get_render_info(RenderInfo p_info) override;
  708. virtual String get_video_adapter_name() const override;
  709. virtual String get_video_adapter_vendor() const override;
  710. virtual void set_frame_profiling_enabled(bool p_enable) override;
  711. virtual Vector<FrameProfileArea> get_frame_profile() override;
  712. virtual uint64_t get_frame_profile_frame() override;
  713. virtual RID get_test_cube() override;
  714. /* TESTING */
  715. virtual float get_frame_setup_time_cpu() const override;
  716. virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) override;
  717. virtual void set_default_clear_color(const Color &p_color) override;
  718. virtual bool has_feature(Features p_feature) const override;
  719. virtual bool has_os_feature(const String &p_feature) const override;
  720. virtual void set_debug_generate_wireframes(bool p_generate) override;
  721. virtual bool is_low_end() const override;
  722. virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) override;
  723. virtual void set_print_gpu_profile(bool p_enable) override;
  724. RenderingServerDefault(bool p_create_thread = false);
  725. ~RenderingServerDefault();
  726. };
  727. #endif