summaryrefslogtreecommitdiff
path: root/scene/2d/light_occluder_2d.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2020-03-27 15:21:27 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-03-27 15:21:27 -0300
commita6f3bc7c696af03e3875f78e098d2476e409d15e (patch)
treefc1bb58e900436c48c03c52106eb57250442ae35 /scene/2d/light_occluder_2d.cpp
parent307b1b3a5835ecdb477859785c673a07e248f904 (diff)
Renaming of servers for coherency.
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
Diffstat (limited to 'scene/2d/light_occluder_2d.cpp')
-rw-r--r--scene/2d/light_occluder_2d.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index d4a5c93823..bd1a820aec 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -88,7 +88,7 @@ void OccluderPolygon2D::set_polygon(const Vector<Vector2> &p_polygon) {
polygon = p_polygon;
rect_cache_dirty = true;
- VS::get_singleton()->canvas_occluder_polygon_set_shape(occ_polygon, p_polygon, closed);
+ RS::get_singleton()->canvas_occluder_polygon_set_shape(occ_polygon, p_polygon, closed);
emit_changed();
}
@@ -103,7 +103,7 @@ void OccluderPolygon2D::set_closed(bool p_closed) {
return;
closed = p_closed;
if (polygon.size())
- VS::get_singleton()->canvas_occluder_polygon_set_shape(occ_polygon, polygon, closed);
+ RS::get_singleton()->canvas_occluder_polygon_set_shape(occ_polygon, polygon, closed);
emit_changed();
}
@@ -115,7 +115,7 @@ bool OccluderPolygon2D::is_closed() const {
void OccluderPolygon2D::set_cull_mode(CullMode p_mode) {
cull = p_mode;
- VS::get_singleton()->canvas_occluder_polygon_set_cull_mode(occ_polygon, VS::CanvasOccluderPolygonCullMode(p_mode));
+ RS::get_singleton()->canvas_occluder_polygon_set_cull_mode(occ_polygon, RS::CanvasOccluderPolygonCullMode(p_mode));
}
OccluderPolygon2D::CullMode OccluderPolygon2D::get_cull_mode() const {
@@ -150,7 +150,7 @@ void OccluderPolygon2D::_bind_methods() {
OccluderPolygon2D::OccluderPolygon2D() {
- occ_polygon = VS::get_singleton()->canvas_occluder_polygon_create();
+ occ_polygon = RS::get_singleton()->canvas_occluder_polygon_create();
closed = true;
cull = CULL_DISABLED;
rect_cache_dirty = true;
@@ -158,7 +158,7 @@ OccluderPolygon2D::OccluderPolygon2D() {
OccluderPolygon2D::~OccluderPolygon2D() {
- VS::get_singleton()->free(occ_polygon);
+ RS::get_singleton()->free(occ_polygon);
}
void LightOccluder2D::_poly_changed() {
@@ -172,17 +172,17 @@ void LightOccluder2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_CANVAS) {
- VS::get_singleton()->canvas_light_occluder_attach_to_canvas(occluder, get_canvas());
- VS::get_singleton()->canvas_light_occluder_set_transform(occluder, get_global_transform());
- VS::get_singleton()->canvas_light_occluder_set_enabled(occluder, is_visible_in_tree());
+ RS::get_singleton()->canvas_light_occluder_attach_to_canvas(occluder, get_canvas());
+ RS::get_singleton()->canvas_light_occluder_set_transform(occluder, get_global_transform());
+ RS::get_singleton()->canvas_light_occluder_set_enabled(occluder, is_visible_in_tree());
}
if (p_what == NOTIFICATION_TRANSFORM_CHANGED) {
- VS::get_singleton()->canvas_light_occluder_set_transform(occluder, get_global_transform());
+ RS::get_singleton()->canvas_light_occluder_set_transform(occluder, get_global_transform());
}
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
- VS::get_singleton()->canvas_light_occluder_set_enabled(occluder, is_visible_in_tree());
+ RS::get_singleton()->canvas_light_occluder_set_enabled(occluder, is_visible_in_tree());
}
if (p_what == NOTIFICATION_DRAW) {
@@ -214,7 +214,7 @@ void LightOccluder2D::_notification(int p_what) {
if (p_what == NOTIFICATION_EXIT_CANVAS) {
- VS::get_singleton()->canvas_light_occluder_attach_to_canvas(occluder, RID());
+ RS::get_singleton()->canvas_light_occluder_attach_to_canvas(occluder, RID());
}
}
@@ -239,9 +239,9 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
occluder_polygon = p_polygon;
if (occluder_polygon.is_valid())
- VS::get_singleton()->canvas_light_occluder_set_polygon(occluder, occluder_polygon->get_rid());
+ RS::get_singleton()->canvas_light_occluder_set_polygon(occluder, occluder_polygon->get_rid());
else
- VS::get_singleton()->canvas_light_occluder_set_polygon(occluder, RID());
+ RS::get_singleton()->canvas_light_occluder_set_polygon(occluder, RID());
#ifdef DEBUG_ENABLED
if (occluder_polygon.is_valid())
@@ -258,7 +258,7 @@ Ref<OccluderPolygon2D> LightOccluder2D::get_occluder_polygon() const {
void LightOccluder2D::set_occluder_light_mask(int p_mask) {
mask = p_mask;
- VS::get_singleton()->canvas_light_occluder_set_light_mask(occluder, mask);
+ RS::get_singleton()->canvas_light_occluder_set_light_mask(occluder, mask);
}
int LightOccluder2D::get_occluder_light_mask() const {
@@ -293,12 +293,12 @@ void LightOccluder2D::_bind_methods() {
LightOccluder2D::LightOccluder2D() {
- occluder = VS::get_singleton()->canvas_light_occluder_create();
+ occluder = RS::get_singleton()->canvas_light_occluder_create();
mask = 1;
set_notify_transform(true);
}
LightOccluder2D::~LightOccluder2D() {
- VS::get_singleton()->free(occluder);
+ RS::get_singleton()->free(occluder);
}