diff options
Diffstat (limited to 'servers/rendering/rendering_server_default.h')
-rw-r--r-- | servers/rendering/rendering_server_default.h | 83 |
1 files changed, 53 insertions, 30 deletions
diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h index ea8e8aa056..8dfb5985f8 100644 --- a/servers/rendering/rendering_server_default.h +++ b/servers/rendering/rendering_server_default.h @@ -213,14 +213,13 @@ public: FUNC2(texture_set_force_redraw_if_visible, RID, bool) -//from now on, calls forwarded to this singleton + /* SHADER API */ + #undef ServerName #undef server_name -#define ServerName RendererStorage -#define server_name RSG::storage - - /* SHADER API */ +#define ServerName RendererMaterialStorage +#define server_name RSG::material_storage FUNCRIDSPLIT(shader) @@ -249,8 +248,15 @@ public: /* MESH API */ +//from now on, calls forwarded to this singleton +#undef ServerName +#undef server_name + +#define ServerName RendererMeshStorage +#define server_name RSG::mesh_storage + virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces, int p_blend_shape_count = 0) override { - RID mesh = RSG::storage->mesh_allocate(); + RID mesh = RSG::mesh_storage->mesh_allocate(); // TODO once we have RSG::mesh_storage, add can_create_resources_async and call here instead of texture_storage!! @@ -258,16 +264,16 @@ public: if (Thread::get_caller_id() == server_thread) { command_queue.flush_if_pending(); } - RSG::storage->mesh_initialize(mesh); - RSG::storage->mesh_set_blend_shape_count(mesh, p_blend_shape_count); + RSG::mesh_storage->mesh_initialize(mesh); + RSG::mesh_storage->mesh_set_blend_shape_count(mesh, p_blend_shape_count); for (int i = 0; i < p_surfaces.size(); i++) { - RSG::storage->mesh_add_surface(mesh, p_surfaces[i]); + RSG::mesh_storage->mesh_add_surface(mesh, p_surfaces[i]); } } else { - command_queue.push(RSG::storage, &RendererStorage::mesh_initialize, mesh); - command_queue.push(RSG::storage, &RendererStorage::mesh_set_blend_shape_count, mesh, p_blend_shape_count); + command_queue.push(RSG::mesh_storage, &RendererMeshStorage::mesh_initialize, mesh); + command_queue.push(RSG::mesh_storage, &RendererMeshStorage::mesh_set_blend_shape_count, mesh, p_blend_shape_count); for (int i = 0; i < p_surfaces.size(); i++) { - command_queue.push(RSG::storage, &RendererStorage::mesh_add_surface, mesh, p_surfaces[i]); + command_queue.push(RSG::mesh_storage, &RendererMeshStorage::mesh_add_surface, mesh, p_surfaces[i]); } } @@ -342,6 +348,11 @@ public: FUNC2(skeleton_set_base_transform_2d, RID, const Transform2D &) /* Light API */ +#undef ServerName +#undef server_name + +#define ServerName RendererLightStorage +#define server_name RSG::light_storage FUNCRIDSPLIT(directional_light) FUNCRIDSPLIT(omni_light) @@ -383,13 +394,27 @@ public: FUNC2(reflection_probe_set_resolution, RID, int) FUNC2(reflection_probe_set_mesh_lod_threshold, RID, float) + /* LIGHTMAP */ + + FUNCRIDSPLIT(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) + FUNC1(lightmap_set_probe_capture_update_speed, float) + /* DECAL API */ #undef ServerName #undef server_name -#define ServerName RendererDecalAtlasStorage -#define server_name RSG::decal_atlas_storage +#define ServerName RendererTextureStorage +#define server_name RSG::texture_storage FUNCRIDSPLIT(decal) @@ -432,21 +457,13 @@ public: FUNC2(voxel_gi_set_interior, RID, bool) FUNC2(voxel_gi_set_use_two_bounces, RID, bool) - /* LIGHTMAP */ - - FUNCRIDSPLIT(lightmap) + /* PARTICLES */ - 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) - FUNC1(lightmap_set_probe_capture_update_speed, float) +#undef ServerName +#undef server_name - /* PARTICLES */ +#define ServerName RendererParticlesStorage +#define server_name RSG::particles_storage FUNCRIDSPLIT(particles) @@ -503,6 +520,12 @@ public: /* FOG VOLUME */ +#undef ServerName +#undef server_name + +#define ServerName RendererStorage +#define server_name RSG::storage + FUNCRIDSPLIT(fog_volume) FUNC2(fog_volume_set_shape, RID, FogVolumeShape) @@ -788,7 +811,7 @@ public: FUNC2(canvas_item_set_draw_behind_parent, RID, bool) - FUNC5(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float) + FUNC6(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float, bool) FUNC5(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool) FUNC4(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float) FUNC3(canvas_item_add_rect, RID, const Rect2 &, const Color &) @@ -870,8 +893,8 @@ public: #undef server_name #undef ServerName //from now on, calls forwarded to this singleton -#define ServerName RendererStorage -#define server_name RSG::storage +#define ServerName RendererMaterialStorage +#define server_name RSG::material_storage FUNC3(global_variable_add, const StringName &, GlobalVariableType, const Variant &) FUNC1(global_variable_remove, const StringName &) |