diff options
Diffstat (limited to 'servers/visual')
-rw-r--r-- | servers/visual/rasterizer.h | 10 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 67 | ||||
-rw-r--r-- | servers/visual/shader_language.h | 12 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.cpp | 85 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.h | 1 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 4 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 6 | ||||
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 42 | ||||
-rw-r--r-- | servers/visual/visual_server_scene.h | 14 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.cpp | 8 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.h | 5 |
11 files changed, 223 insertions, 31 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 21d059c48e..df41c3b5ce 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -116,8 +116,8 @@ public: virtual void base_changed() = 0; virtual void base_material_changed() = 0; - InstanceBase() - : dependency_item(this) { + InstanceBase() : + dependency_item(this) { base_type = VS::INSTANCE_NONE; cast_shadows = VS::SHADOW_CASTING_SETTING_ON; @@ -193,6 +193,8 @@ public: virtual void textures_keep_original(bool p_enable) = 0; + virtual void texture_set_proxy(RID p_proxy, RID p_base) = 0; + /* SKY API */ virtual RID sky_create() = 0; @@ -634,6 +636,7 @@ public: struct CommandPolyLine : public Command { bool antialiased; + bool multiline; Vector<Point2> triangles; Vector<Color> triangle_colors; Vector<Point2> lines; @@ -641,6 +644,7 @@ public: CommandPolyLine() { type = TYPE_POLYLINE; antialiased = false; + multiline = false; } }; @@ -1027,7 +1031,7 @@ public: virtual void restore_render_target() = 0; virtual void clear_render_target(const Color &p_color) = 0; virtual void blit_render_target_to_screen(RID p_render_target, const Rect2 &p_screen_rect, int p_screen = 0) = 0; - virtual void end_frame() = 0; + virtual void end_frame(bool p_swap_buffers) = 0; virtual void finalize() = 0; virtual ~Rasterizer() {} diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 246a80280e..e10a57c571 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -254,6 +254,9 @@ const ShaderLanguage::KeyWord ShaderLanguage::keyword_list[] = { { TK_TYPE_ISAMPLER2D, "isampler2D" }, { TK_TYPE_USAMPLER2D, "usampler2D" }, { TK_TYPE_SAMPLERCUBE, "samplerCube" }, + { TK_INTERPOLATION_FLAT, "flat" }, + { TK_INTERPOLATION_NO_PERSPECTIVE, "noperspective" }, + { TK_INTERPOLATION_SMOOTH, "smooth" }, { TK_PRECISION_LOW, "lowp" }, { TK_PRECISION_MID, "mediump" }, { TK_PRECISION_HIGH, "highp" }, @@ -658,6 +661,24 @@ ShaderLanguage::DataType ShaderLanguage::get_token_datatype(TokenType p_type) { return DataType(p_type - TK_TYPE_VOID); } +bool ShaderLanguage::is_token_interpolation(TokenType p_type) { + + return ( + p_type == TK_INTERPOLATION_FLAT || + p_type == TK_INTERPOLATION_NO_PERSPECTIVE || + p_type == TK_INTERPOLATION_SMOOTH); +} + +ShaderLanguage::DataInterpolation ShaderLanguage::get_token_interpolation(TokenType p_type) { + + if (p_type == TK_INTERPOLATION_FLAT) + return INTERPOLATION_FLAT; + else if (p_type == TK_INTERPOLATION_NO_PERSPECTIVE) + return INTERPOLATION_NO_PERSPECTIVE; + else + return INTERPOLATION_SMOOTH; +} + bool ShaderLanguage::is_token_precision(TokenType p_type) { return ( @@ -1352,15 +1373,54 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = { //builtins - trigonometry { "sin", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "sin", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "sin", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "sin", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + { "cos", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "cos", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "cos", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "cos", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + { "tan", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "tan", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "tan", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "tan", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + { "asin", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "asin", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "asin", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "asin", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + { "acos", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "acos", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "acos", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "acos", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + { "atan", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "atan", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "atan", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "atan", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, { "atan", TYPE_FLOAT, { TYPE_FLOAT, TYPE_FLOAT, TYPE_VOID } }, + { "atan", TYPE_VEC2, { TYPE_VEC2, TYPE_VEC2, TYPE_VOID } }, + { "atan", TYPE_VEC3, { TYPE_VEC3, TYPE_VEC3, TYPE_VOID } }, + { "atan", TYPE_VEC4, { TYPE_VEC4, TYPE_VEC4, TYPE_VOID } }, + { "sinh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "sinh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "sinh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "sinh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + { "cosh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "cosh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "cosh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "cosh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + { "tanh", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID } }, + { "tanh", TYPE_VEC2, { TYPE_VEC2, TYPE_VOID } }, + { "tanh", TYPE_VEC3, { TYPE_VEC3, TYPE_VOID } }, + { "tanh", TYPE_VEC4, { TYPE_VEC4, TYPE_VOID } }, + //builtins - exponential { "pow", TYPE_FLOAT, { TYPE_FLOAT, TYPE_FLOAT, TYPE_VOID } }, { "pow", TYPE_VEC2, { TYPE_VEC2, TYPE_VEC2, TYPE_VOID } }, @@ -3537,10 +3597,16 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct bool uniform = tk.type == TK_UNIFORM; DataPrecision precision = PRECISION_DEFAULT; + DataInterpolation interpolation = INTERPOLATION_SMOOTH; DataType type; StringName name; tk = _get_token(); + if (is_token_interpolation(tk.type)) { + interpolation = get_token_interpolation(tk.type); + tk = _get_token(); + } + if (is_token_precision(tk.type)) { precision = get_token_precision(tk.type); tk = _get_token(); @@ -3738,6 +3804,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct ShaderNode::Varying varying; varying.type = type; varying.precission = precision; + varying.interpolation = interpolation; shader->varyings[name] = varying; tk = _get_token(); diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h index 7a7f6dd71c..e092bf931f 100644 --- a/servers/visual/shader_language.h +++ b/servers/visual/shader_language.h @@ -72,6 +72,9 @@ public: TK_TYPE_ISAMPLER2D, TK_TYPE_USAMPLER2D, TK_TYPE_SAMPLERCUBE, + TK_INTERPOLATION_FLAT, + TK_INTERPOLATION_NO_PERSPECTIVE, + TK_INTERPOLATION_SMOOTH, TK_PRECISION_LOW, TK_PRECISION_MID, TK_PRECISION_HIGH, @@ -192,6 +195,12 @@ public: PRECISION_DEFAULT, }; + enum DataInterpolation { + INTERPOLATION_FLAT, + INTERPOLATION_NO_PERSPECTIVE, + INTERPOLATION_SMOOTH, + }; + enum Operator { OP_EQUAL, OP_NOT_EQUAL, @@ -431,6 +440,7 @@ public: struct Varying { DataType type; + DataInterpolation interpolation; DataPrecision precission; }; @@ -511,6 +521,8 @@ public: static bool is_token_datatype(TokenType p_type); static DataType get_token_datatype(TokenType p_type); + static bool is_token_interpolation(TokenType p_type); + static DataInterpolation get_token_interpolation(TokenType p_type); static bool is_token_precision(TokenType p_type); static DataPrecision get_token_precision(TokenType p_type); static String get_datatype_name(DataType p_type); diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index 31c09dc23d..0fed9cc961 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -416,6 +416,7 @@ void VisualServerCanvas::canvas_item_add_polyline(RID p_item, const Vector<Point ERR_FAIL_COND(!pline); pline->antialiased = p_antialiased; + pline->multiline = false; if (p_width <= 1) { pline->lines = p_points; @@ -486,6 +487,90 @@ void VisualServerCanvas::canvas_item_add_polyline(RID p_item, const Vector<Point canvas_item->commands.push_back(pline); } +void VisualServerCanvas::canvas_item_add_multiline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width, bool p_antialiased) { + + ERR_FAIL_COND(p_points.size() < 2); + Item *canvas_item = canvas_item_owner.getornull(p_item); + ERR_FAIL_COND(!canvas_item); + + Item::CommandPolyLine *pline = memnew(Item::CommandPolyLine); + ERR_FAIL_COND(!pline); + + pline->antialiased = false; //todo + pline->multiline = true; + + // if (p_width <= 1) { + pline->lines = p_points; + pline->line_colors = p_colors; + if (pline->line_colors.size() == 0) { + pline->line_colors.push_back(Color(1, 1, 1, 1)); + } else if (pline->line_colors.size() > 1 && pline->line_colors.size() != pline->lines.size()) { + pline->line_colors.resize(1); + } +#if 0 +//width not yet + } else { + //make a trianglestrip for drawing the line... + Vector2 prev_t; + pline->triangles.resize(p_points.size() * 2); + if (p_antialiased) { + pline->lines.resize(p_points.size() * 2); + } + + if (p_colors.size() == 0) { + pline->triangle_colors.push_back(Color(1, 1, 1, 1)); + if (p_antialiased) { + pline->line_colors.push_back(Color(1, 1, 1, 1)); + } + } + if (p_colors.size() == 1) { + pline->triangle_colors = p_colors; + pline->line_colors = p_colors; + } else { + pline->triangle_colors.resize(pline->triangles.size()); + pline->line_colors.resize(pline->lines.size()); + } + + for (int i = 0; i < p_points.size(); i++) { + + Vector2 t; + if (i == p_points.size() - 1) { + t = prev_t; + } else { + t = (p_points[i + 1] - p_points[i]).normalized().tangent(); + if (i == 0) { + prev_t = t; + } + } + + Vector2 tangent = ((t + prev_t).normalized()) * p_width * 0.5; + + if (p_antialiased) { + pline->lines[i] = p_points[i] + tangent; + pline->lines[p_points.size() * 2 - i - 1] = p_points[i] - tangent; + if (pline->line_colors.size() > 1) { + pline->line_colors[i] = p_colors[i]; + pline->line_colors[p_points.size() * 2 - i - 1] = p_colors[i]; + } + } + + pline->triangles[i * 2 + 0] = p_points[i] + tangent; + pline->triangles[i * 2 + 1] = p_points[i] - tangent; + + if (pline->triangle_colors.size() > 1) { + + pline->triangle_colors[i * 2 + 0] = p_colors[i]; + pline->triangle_colors[i * 2 + 1] = p_colors[i]; + } + + prev_t = t; + } + } +#endif + canvas_item->rect_dirty = true; + canvas_item->commands.push_back(pline); +} + void VisualServerCanvas::canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color) { Item *canvas_item = canvas_item_owner.getornull(p_item); diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h index a92370f1f0..3143ac847f 100644 --- a/servers/visual/visual_server_canvas.h +++ b/servers/visual/visual_server_canvas.h @@ -172,6 +172,7 @@ public: void canvas_item_add_line(RID p_item, const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width = 1.0, bool p_antialiased = false); void canvas_item_add_polyline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width = 1.0, bool p_antialiased = false); + void canvas_item_add_multiline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width = 1.0, bool p_antialiased = false); void canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color); void canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color); void canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID()); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 9432d3fdd9..6b527b5cd1 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -92,7 +92,7 @@ void VisualServerRaster::request_frame_drawn_callback(Object *p_where, const Str frame_drawn_callbacks.push_back(fdc); } -void VisualServerRaster::draw() { +void VisualServerRaster::draw(bool p_swap_buffers) { changes = 0; @@ -103,7 +103,7 @@ void VisualServerRaster::draw() { VSG::viewport->draw_viewports(); VSG::scene->render_probes(); _draw_margins(); - VSG::rasterizer->end_frame(); + VSG::rasterizer->end_frame(p_swap_buffers); while (frame_drawn_callbacks.front()) { diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 7551485919..d843c443a2 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -96,7 +96,6 @@ public: #define DISPLAY_CHANGED \ changes++; #endif - // print_line(String("CHANGED: ") + __FUNCTION__); #define BIND0R(m_r, m_name) \ m_r m_name() { return BINDBASE->m_name(); } @@ -168,6 +167,8 @@ public: BIND1(textures_keep_original, bool) + BIND2(texture_set_proxy, RID, RID) + /* SKY API */ BIND0R(RID, sky_create) @@ -550,6 +551,7 @@ public: BIND6(canvas_item_add_line, RID, const Point2 &, const Point2 &, const Color &, float, bool) BIND5(canvas_item_add_polyline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool) + BIND5(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool) BIND3(canvas_item_add_rect, RID, const Rect2 &, const Color &) BIND4(canvas_item_add_circle, RID, const Point2 &, float, const Color &) BIND7(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool, RID) @@ -625,7 +627,7 @@ public: virtual void request_frame_drawn_callback(Object *p_where, const StringName &p_method, const Variant &p_userdata); - virtual void draw(); + virtual void draw(bool p_swap_buffers); virtual void sync(); virtual bool has_changed() const; virtual void init(); diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 69827b330d..eef4720d22 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -303,6 +303,23 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) { VSG::storage->instance_remove_dependency(instance->base, instance); + if (instance->base_type == VS::INSTANCE_GI_PROBE) { + //if gi probe is baking, wait until done baking, else race condition may happen when removing it + //from octree + InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(instance->base_data); + + //make sure probes are done baking + while (!probe_bake_list.empty()) { + OS::get_singleton()->delay_usec(1); + } + //make sure this one is done baking + + while (gi_probe->dynamic.updating_stage == GI_UPDATE_STAGE_LIGHTING) { + //wait until bake is done if it's baking + OS::get_singleton()->delay_usec(1); + } + } + if (scenario && instance->octree_id) { scenario->octree.erase(instance->octree_id); //make dependencies generated by the octree go away instance->octree_id = 0; @@ -331,10 +348,6 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) { InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(instance->base_data); - while (gi_probe->dynamic.updating_stage == GI_UPDATE_STAGE_LIGHTING) { - //wait until bake is done if it's baking - OS::get_singleton()->delay_usec(1); - } if (gi_probe->update_element.in_list()) { gi_probe_update_list.remove(&gi_probe->update_element); } @@ -1320,9 +1333,7 @@ void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_view p_viewport_size.width / (float)p_viewport_size.height, camera->znear, camera->zfar, - camera->vaspect - - ); + camera->vaspect); ortho = true; } break; case Camera::PERSPECTIVE: { @@ -1332,9 +1343,7 @@ void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_view p_viewport_size.width / (float)p_viewport_size.height, camera->znear, camera->zfar, - camera->vaspect - - ); + camera->vaspect); ortho = false; } break; @@ -2589,7 +2598,15 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) { } //send back to main thread to update un little chunks + if (probe_bake_mutex) { + probe_bake_mutex->lock(); + } + probe_data->dynamic.updating_stage = GI_UPDATE_STAGE_UPLOADING; + + if (probe_bake_mutex) { + probe_bake_mutex->unlock(); + } } bool VisualServerScene::_check_gi_probe(Instance *p_gi_probe) { @@ -2721,12 +2738,11 @@ void VisualServerScene::render_probes() { switch (probe->dynamic.updating_stage) { case GI_UPDATE_STAGE_CHECK: { - if (_check_gi_probe(instance_probe) || force_lighting) { - //send to lighting thread - probe->dynamic.updating_stage = GI_UPDATE_STAGE_LIGHTING; + if (_check_gi_probe(instance_probe) || force_lighting) { //send to lighting thread #ifndef NO_THREADS probe_bake_mutex->lock(); + probe->dynamic.updating_stage = GI_UPDATE_STAGE_LIGHTING; probe_bake_list.push_back(instance_probe); probe_bake_mutex->unlock(); probe_bake_sem->post(); diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index 9af5ffb74d..9e4701de65 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -229,8 +229,9 @@ public: singleton->_instance_queue_update(this, false, true); } - Instance() - : scenario_item(this), update_item(this) { + Instance() : + scenario_item(this), + update_item(this) { octree_id = 0; scenario = NULL; @@ -305,8 +306,8 @@ public: int render_step; - InstanceReflectionProbeData() - : update_list(this) { + InstanceReflectionProbeData() : + update_list(this) { reflection_dirty = true; render_step = -1; @@ -434,10 +435,11 @@ public: SelfList<InstanceGIProbeData> update_element; - InstanceGIProbeData() - : update_element(this) { + InstanceGIProbeData() : + update_element(this) { invalid = true; base_version = 0; + dynamic.updating_stage = GI_UPDATE_STAGE_CHECK; } }; diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index a9bfef7ef3..b86a0ae3f6 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -89,7 +89,7 @@ void VisualServerWrapMT::sync() { } } -void VisualServerWrapMT::draw() { +void VisualServerWrapMT::draw(bool p_swap_buffers) { if (create_thread) { @@ -97,7 +97,7 @@ void VisualServerWrapMT::draw() { command_queue.push(this, &VisualServerWrapMT::thread_draw); } else { - visual_server->draw(); + visual_server->draw(p_swap_buffers); } } @@ -158,8 +158,8 @@ void VisualServerWrapMT::finish() { canvas_occluder_polygon_free_cached_ids(); } -VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread) - : command_queue(p_create_thread) { +VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread) : + command_queue(p_create_thread) { visual_server = p_contained; create_thread = p_create_thread; diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index 417e8de833..94f450c024 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -100,6 +100,8 @@ public: FUNC1(textures_keep_original, bool) + FUNC2(texture_set_proxy, RID, RID) + /* SKY API */ FUNCRID(sky) @@ -465,6 +467,7 @@ public: 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) + FUNC5(canvas_item_add_multiline, RID, const Vector<Point2> &, const Vector<Color> &, float, bool) FUNC3(canvas_item_add_rect, RID, const Rect2 &, const Color &) FUNC4(canvas_item_add_circle, RID, const Point2 &, float, const Color &) FUNC7(canvas_item_add_texture_rect, RID, const Rect2 &, RID, bool, const Color &, bool, RID) @@ -542,7 +545,7 @@ public: virtual void init(); virtual void finish(); - virtual void draw(); + virtual void draw(bool p_swap_buffers); virtual void sync(); FUNC0RC(bool, has_changed) |