diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/arvr_server.h | 2 | ||||
-rw-r--r-- | servers/audio_server.cpp | 4 | ||||
-rw-r--r-- | servers/physics_2d/joints_2d_sw.cpp | 9 | ||||
-rw-r--r-- | servers/physics_server.cpp | 2 | ||||
-rw-r--r-- | servers/register_server_types.cpp | 5 | ||||
-rw-r--r-- | servers/visual/rasterizer.h | 6 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 13 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.cpp | 19 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.h | 7 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 1 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 5 | ||||
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 1 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.h | 5 | ||||
-rw-r--r-- | servers/visual_server.cpp | 4 | ||||
-rw-r--r-- | servers/visual_server.h | 6 |
15 files changed, 56 insertions, 33 deletions
diff --git a/servers/arvr_server.h b/servers/arvr_server.h index 34f143c0e0..63b7edc73b 100644 --- a/servers/arvr_server.h +++ b/servers/arvr_server.h @@ -49,7 +49,7 @@ class ARVRPositionalTracker; Also each positioning tracker is accessible from here. I've added some additional info into this header file that should move - into the documention, I will do so when we're close to accepting this PR + into the documentation, I will do so when we're close to accepting this PR or as a separate PR once this has been merged into the master branch. **/ diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 5c453a3113..783788a6a1 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -153,7 +153,7 @@ void AudioDriverManager::initialize(int p_driver) { ERR_PRINT("AudioDriverManager: all drivers failed, falling back to dummy driver"); dummy_driver.set_singleton(); } else { - ERR_PRINT("AudioDriverManager: dummy driver faild to init()"); + ERR_PRINT("AudioDriverManager: dummy driver failed to init()"); } } @@ -858,7 +858,7 @@ void AudioServer::init() { channel_disable_threshold_db = GLOBAL_DEF("audio/channel_disable_threshold_db", -60.0); channel_disable_frames = float(GLOBAL_DEF("audio/channel_disable_time", 2.0)) * get_mix_rate(); - buffer_size = 1024; //harcoded for now + buffer_size = 1024; //hardcoded for now temp_buffer.resize(get_channel_count()); diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp index 7fba8acebd..d49c1b8376 100644 --- a/servers/physics_2d/joints_2d_sw.cpp +++ b/servers/physics_2d/joints_2d_sw.cpp @@ -146,14 +146,19 @@ bool PinJoint2DSW::setup(real_t p_step) { return true; } +inline Vector2 custom_cross(const Vector2 &p_vec, real_t p_other) { + + return Vector2(p_other * p_vec.y, -p_other * p_vec.x); +} + void PinJoint2DSW::solve(real_t p_step) { // compute relative velocity - Vector2 vA = A->get_linear_velocity() - rA.cross(A->get_angular_velocity()); + Vector2 vA = A->get_linear_velocity() - custom_cross(rA, A->get_angular_velocity()); Vector2 rel_vel; if (B) - rel_vel = B->get_linear_velocity() - rB.cross(B->get_angular_velocity()) - vA; + rel_vel = B->get_linear_velocity() - custom_cross(rB, B->get_angular_velocity()) - vA; else rel_vel = -vA; diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index db5e14043c..f01a4c2f64 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -96,7 +96,7 @@ void PhysicsDirectBodyState::_bind_methods() { ClassDB::bind_method(D_METHOD("add_force", "force", "position"), &PhysicsDirectBodyState::add_force); ClassDB::bind_method(D_METHOD("add_torque", "torque"), &PhysicsDirectBodyState::add_torque); ClassDB::bind_method(D_METHOD("apply_impulse", "position", "j"), &PhysicsDirectBodyState::apply_impulse); - ClassDB::bind_method(D_METHOD("apply_torqe_impulse", "j"), &PhysicsDirectBodyState::apply_torque_impulse); + ClassDB::bind_method(D_METHOD("apply_torque_impulse", "j"), &PhysicsDirectBodyState::apply_torque_impulse); ClassDB::bind_method(D_METHOD("set_sleep_state", "enabled"), &PhysicsDirectBodyState::set_sleep_state); ClassDB::bind_method(D_METHOD("is_sleeping"), &PhysicsDirectBodyState::is_sleeping); diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index aaac32a4f2..1bad7e652b 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -80,6 +80,7 @@ static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsag ShaderTypes *shader_types = NULL; PhysicsServer *_createGodotPhysicsCallback() { + WARN_PRINT("The GodotPhysics 3D physics engine is deprecated and will be removed in Godot 3.2. You should use the Bullet physics engine instead (configurable in your project settings)."); return memnew(PhysicsServerSW); } @@ -163,8 +164,8 @@ void register_server_types() { GLOBAL_DEF(PhysicsServerManager::setting_property_name, "DEFAULT"); ProjectSettings::get_singleton()->set_custom_property_info(PhysicsServerManager::setting_property_name, PropertyInfo(Variant::STRING, PhysicsServerManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT")); - PhysicsServerManager::register_server("GodotPhysics", &_createGodotPhysicsCallback); - PhysicsServerManager::set_default_server("GodotPhysics"); + PhysicsServerManager::register_server("GodotPhysics - deprecated", &_createGodotPhysicsCallback); + PhysicsServerManager::set_default_server("GodotPhysics - deprecated"); } void unregister_server_types() { diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 378a05cdfe..8bf112b0de 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -749,7 +749,6 @@ public: struct CommandMesh : public Command { RID mesh; - RID skeleton; RID texture; RID normal_map; CommandMesh() { type = TYPE_MESH; } @@ -758,7 +757,6 @@ public: struct CommandMultiMesh : public Command { RID multimesh; - RID skeleton; RID texture; RID normal_map; CommandMultiMesh() { type = TYPE_MULTIMESH; } @@ -924,7 +922,7 @@ public: case Item::Command::TYPE_MESH: { const Item::CommandMesh *mesh = static_cast<const Item::CommandMesh *>(c); - AABB aabb = RasterizerStorage::base_singleton->mesh_get_aabb(mesh->mesh, mesh->skeleton); + AABB aabb = RasterizerStorage::base_singleton->mesh_get_aabb(mesh->mesh, RID()); r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y); @@ -1016,7 +1014,7 @@ public: virtual void canvas_begin() = 0; virtual void canvas_end() = 0; - virtual void canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light) = 0; + virtual void canvas_render_items(Item *p_item_list, int p_z, const Color &p_modulate, Light *p_light, const Transform2D &p_base_transform) = 0; virtual void canvas_debug_viewport_shadows(Light *p_lights_with_shadow) = 0; struct LightOccluderInstance : public RID_Data { diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index d9f2c949e9..f5c926c093 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -124,6 +124,9 @@ const char *ShaderLanguage::token_names[TK_MAX] = { "TYPE_ISAMPLER2D", "TYPE_USAMPLER2D", "TYPE_SAMPLERCUBE", + "INTERPOLATION_FLAT", + "INTERPOLATION_NO_PERSPECTIVE", + "INTERPOLATION_SMOOTH", "PRECISION_LOW", "PRECISION_MID", "PRECISION_HIGH", @@ -1608,7 +1611,7 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = { { "mix", TYPE_VEC3, { TYPE_VEC3, TYPE_VEC3, TYPE_VEC3, TYPE_VOID } }, { "mix", TYPE_VEC4, { TYPE_VEC4, TYPE_VEC4, TYPE_FLOAT, TYPE_VOID } }, { "mix", TYPE_VEC4, { TYPE_VEC4, TYPE_VEC4, TYPE_BOOL, TYPE_VOID } }, - { "mix", TYPE_VEC4, { TYPE_VEC4, TYPE_VEC4, TYPE_BVEC3, TYPE_VOID } }, + { "mix", TYPE_VEC4, { TYPE_VEC4, TYPE_VEC4, TYPE_BVEC4, TYPE_VOID } }, { "mix", TYPE_VEC4, { TYPE_VEC4, TYPE_VEC4, TYPE_VEC4, TYPE_VOID } }, { "step", TYPE_FLOAT, { TYPE_FLOAT, TYPE_FLOAT, TYPE_VOID } }, @@ -1641,10 +1644,10 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = { { "floatBitsToInt", TYPE_IVEC3, { TYPE_VEC3, TYPE_VOID } }, { "floatBitsToInt", TYPE_IVEC4, { TYPE_VEC4, TYPE_VOID } }, - { "floatBitsToUInt", TYPE_UINT, { TYPE_FLOAT, TYPE_VOID } }, - { "floatBitsToUInt", TYPE_UVEC2, { TYPE_VEC2, TYPE_VOID } }, - { "floatBitsToUInt", TYPE_UVEC3, { TYPE_VEC3, TYPE_VOID } }, - { "floatBitsToUInt", TYPE_UVEC4, { TYPE_VEC4, TYPE_VOID } }, + { "floatBitsToUint", TYPE_UINT, { TYPE_FLOAT, TYPE_VOID } }, + { "floatBitsToUint", TYPE_UVEC2, { TYPE_VEC2, TYPE_VOID } }, + { "floatBitsToUint", TYPE_UVEC3, { TYPE_VEC3, TYPE_VOID } }, + { "floatBitsToUint", TYPE_UVEC4, { TYPE_VEC4, TYPE_VOID } }, { "intBitsToFloat", TYPE_FLOAT, { TYPE_INT, TYPE_VOID } }, { "intBitsToFloat", TYPE_VEC2, { TYPE_IVEC2, TYPE_VOID } }, diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index 330b2bd0d2..3e6e524117 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -46,7 +46,7 @@ void VisualServerCanvas::_render_canvas_item_tree(Item *p_canvas_item, const Tra for (int i = 0; i < z_range; i++) { if (!z_list[i]) continue; - VSG::canvas_render->canvas_render_items(z_list[i], VS::CANVAS_ITEM_Z_MIN + i, p_modulate, p_lights); + VSG::canvas_render->canvas_render_items(z_list[i], VS::CANVAS_ITEM_Z_MIN + i, p_modulate, p_lights, p_transform); } } @@ -214,7 +214,7 @@ void VisualServerCanvas::render_canvas(Canvas *p_canvas, const Transform2D &p_tr _light_mask_canvas_items(VS::CANVAS_ITEM_Z_MIN + i, z_list[i], p_masked_lights); } - VSG::canvas_render->canvas_render_items(z_list[i], VS::CANVAS_ITEM_Z_MIN + i, p_canvas->modulate, p_lights); + VSG::canvas_render->canvas_render_items(z_list[i], VS::CANVAS_ITEM_Z_MIN + i, p_canvas->modulate, p_lights, p_transform); } } else { @@ -742,7 +742,7 @@ void VisualServerCanvas::canvas_item_add_set_transform(RID p_item, const Transfo canvas_item->commands.push_back(tr); } -void VisualServerCanvas::canvas_item_add_mesh(RID p_item, const RID &p_mesh, RID p_texture, RID p_normal_map, RID p_skeleton) { +void VisualServerCanvas::canvas_item_add_mesh(RID p_item, const RID &p_mesh, RID p_texture, RID p_normal_map) { Item *canvas_item = canvas_item_owner.getornull(p_item); ERR_FAIL_COND(!canvas_item); @@ -752,7 +752,6 @@ void VisualServerCanvas::canvas_item_add_mesh(RID p_item, const RID &p_mesh, RID m->mesh = p_mesh; m->texture = p_texture; m->normal_map = p_normal_map; - m->skeleton = p_skeleton; canvas_item->commands.push_back(m); } @@ -776,7 +775,7 @@ void VisualServerCanvas::canvas_item_add_particles(RID p_item, RID p_particles, canvas_item->commands.push_back(part); } -void VisualServerCanvas::canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture, RID p_normal_map, RID p_skeleton) { +void VisualServerCanvas::canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture, RID p_normal_map) { Item *canvas_item = canvas_item_owner.getornull(p_item); ERR_FAIL_COND(!canvas_item); @@ -784,7 +783,6 @@ void VisualServerCanvas::canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p Item::CommandMultiMesh *mm = memnew(Item::CommandMultiMesh); ERR_FAIL_COND(!mm); mm->multimesh = p_mesh; - mm->skeleton = p_skeleton; mm->texture = p_texture; mm->normal_map = p_normal_map; @@ -826,6 +824,15 @@ void VisualServerCanvas::canvas_item_set_z_as_relative_to_parent(RID p_item, boo canvas_item->z_relative = p_enable; } + +void VisualServerCanvas::canvas_item_attach_skeleton(RID p_item, RID p_skeleton) { + + Item *canvas_item = canvas_item_owner.getornull(p_item); + ERR_FAIL_COND(!canvas_item); + + canvas_item->skeleton = p_skeleton; +} + void VisualServerCanvas::canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect) { 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 250ba5cb08..6a5a7623b6 100644 --- a/servers/visual/visual_server_canvas.h +++ b/servers/visual/visual_server_canvas.h @@ -51,6 +51,8 @@ public: Vector<Item *> child_items; + RID skeleton; + Item() { children_order_dirty = true; E = NULL; @@ -182,8 +184,8 @@ public: void canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width = 1.0, RID p_normal_map = RID()); void canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID(), RID p_normal_map = RID(), bool p_antialiased = false); void canvas_item_add_triangle_array(RID p_item, const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID(), int p_count = -1, RID p_normal_map = RID()); - void canvas_item_add_mesh(RID p_item, const RID &p_mesh, RID p_texture = RID(), RID p_normal_map = RID(), RID p_skeleton = RID()); - void canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture = RID(), RID p_normal_map = RID(), RID p_skeleton = RID()); + void canvas_item_add_mesh(RID p_item, const RID &p_mesh, RID p_texture = RID(), RID p_normal_map = RID()); + void canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture = RID(), RID p_normal_map = RID()); void canvas_item_add_particles(RID p_item, RID p_particles, RID p_texture, RID p_normal, int p_h_frames, int p_v_frames); void canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform); void canvas_item_add_clip_ignore(RID p_item, bool p_ignore); @@ -191,6 +193,7 @@ public: void canvas_item_set_z_index(RID p_item, int p_z); void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable); void canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect); + void canvas_item_attach_skeleton(RID p_item, RID p_skeleton); void canvas_item_clear(RID p_item); void canvas_item_set_draw_index(RID p_item, int p_index); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 64a3502e40..fca3126604 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -205,4 +205,5 @@ VisualServerRaster::~VisualServerRaster() { memdelete(VSG::canvas); memdelete(VSG::viewport); memdelete(VSG::rasterizer); + memdelete(VSG::scene); } diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index b34fbbdec9..a94e110b5d 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -581,8 +581,8 @@ public: BIND7(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float, RID) BIND7(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, RID, bool) BIND8(canvas_item_add_triangle_array, RID, const Vector<int> &, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, int, RID) - BIND5(canvas_item_add_mesh, RID, const RID &, RID, RID, RID) - BIND5(canvas_item_add_multimesh, RID, RID, RID, RID, RID) + BIND4(canvas_item_add_mesh, RID, const RID &, RID, RID) + BIND4(canvas_item_add_multimesh, RID, RID, RID, RID) BIND6(canvas_item_add_particles, RID, RID, RID, RID, int, int) BIND2(canvas_item_add_set_transform, RID, const Transform2D &) BIND2(canvas_item_add_clip_ignore, RID, bool) @@ -590,6 +590,7 @@ public: BIND2(canvas_item_set_z_index, RID, int) BIND2(canvas_item_set_z_as_relative_to_parent, RID, bool) BIND3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &) + BIND2(canvas_item_attach_skeleton, RID, RID) BIND1(canvas_item_clear, RID) BIND2(canvas_item_set_draw_index, RID, int) diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 0920fa748b..884489375f 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -3333,6 +3333,7 @@ VisualServerScene::~VisualServerScene() { #ifndef NO_THREADS probe_bake_thread_exit = true; + probe_bake_sem->post(); Thread::wait_to_finish(probe_bake_thread); memdelete(probe_bake_thread); memdelete(probe_bake_sem); diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index 5a126fb175..b91f80d137 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -499,8 +499,8 @@ public: FUNC7(canvas_item_add_primitive, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, float, RID) FUNC7(canvas_item_add_polygon, RID, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, RID, bool) FUNC8(canvas_item_add_triangle_array, RID, const Vector<int> &, const Vector<Point2> &, const Vector<Color> &, const Vector<Point2> &, RID, int, RID) - FUNC5(canvas_item_add_mesh, RID, const RID &, RID, RID, RID) - FUNC5(canvas_item_add_multimesh, RID, RID, RID, RID, RID) + FUNC4(canvas_item_add_mesh, RID, const RID &, RID, RID) + FUNC4(canvas_item_add_multimesh, RID, RID, RID, RID) FUNC6(canvas_item_add_particles, RID, RID, RID, RID, int, int) FUNC2(canvas_item_add_set_transform, RID, const Transform2D &) FUNC2(canvas_item_add_clip_ignore, RID, bool) @@ -508,6 +508,7 @@ public: FUNC2(canvas_item_set_z_index, RID, int) FUNC2(canvas_item_set_z_as_relative_to_parent, RID, bool) FUNC3(canvas_item_set_copy_to_backbuffer, RID, bool, const Rect2 &) + FUNC2(canvas_item_attach_skeleton, RID, RID) FUNC1(canvas_item_clear, RID) FUNC2(canvas_item_set_draw_index, RID, int) diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 47577a3359..f8640720cb 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1828,8 +1828,8 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("canvas_item_add_primitive", "item", "points", "colors", "uvs", "texture", "width", "normal_map"), &VisualServer::canvas_item_add_primitive, DEFVAL(1.0), DEFVAL(RID())); ClassDB::bind_method(D_METHOD("canvas_item_add_polygon", "item", "points", "colors", "uvs", "texture", "normal_map", "antialiased"), &VisualServer::canvas_item_add_polygon, DEFVAL(Vector<Point2>()), DEFVAL(RID()), DEFVAL(RID()), DEFVAL(false)); ClassDB::bind_method(D_METHOD("canvas_item_add_triangle_array", "item", "indices", "points", "colors", "uvs", "texture", "count", "normal_map"), &VisualServer::canvas_item_add_triangle_array, DEFVAL(Vector<Point2>()), DEFVAL(RID()), DEFVAL(-1), DEFVAL(RID())); - ClassDB::bind_method(D_METHOD("canvas_item_add_mesh", "item", "mesh", "skeleton"), &VisualServer::canvas_item_add_mesh, DEFVAL(RID())); - ClassDB::bind_method(D_METHOD("canvas_item_add_multimesh", "item", "mesh", "skeleton"), &VisualServer::canvas_item_add_multimesh, DEFVAL(RID())); + ClassDB::bind_method(D_METHOD("canvas_item_add_mesh", "item", "mesh", "texture", "normal_map"), &VisualServer::canvas_item_add_mesh, DEFVAL(RID())); + ClassDB::bind_method(D_METHOD("canvas_item_add_multimesh", "item", "mesh", "texture", "normal_map"), &VisualServer::canvas_item_add_multimesh, DEFVAL(RID())); ClassDB::bind_method(D_METHOD("canvas_item_add_particles", "item", "particles", "texture", "normal_map", "h_frames", "v_frames"), &VisualServer::canvas_item_add_particles); ClassDB::bind_method(D_METHOD("canvas_item_add_set_transform", "item", "transform"), &VisualServer::canvas_item_add_set_transform); ClassDB::bind_method(D_METHOD("canvas_item_add_clip_ignore", "item", "ignore"), &VisualServer::canvas_item_add_clip_ignore); diff --git a/servers/visual_server.h b/servers/visual_server.h index 521d0aece9..537588fd6f 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -846,8 +846,8 @@ public: virtual void canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width = 1.0, RID p_normal_map = RID()) = 0; virtual void canvas_item_add_polygon(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID(), RID p_normal_map = RID(), bool p_antialiased = false) = 0; virtual void canvas_item_add_triangle_array(RID p_item, const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), RID p_texture = RID(), int p_count = -1, RID p_normal_map = RID()) = 0; - virtual void canvas_item_add_mesh(RID p_item, const RID &p_mesh, RID p_texture = RID(), RID p_normal_map = RID(), RID p_skeleton = RID()) = 0; - virtual void canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture = RID(), RID p_normal_map = RID(), RID p_skeleton = RID()) = 0; + virtual void canvas_item_add_mesh(RID p_item, const RID &p_mesh, RID p_texture = RID(), RID p_normal_map = RID()) = 0; + virtual void canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture = RID(), RID p_normal_map = RID()) = 0; virtual void canvas_item_add_particles(RID p_item, RID p_particles, RID p_texture, RID p_normal_map, int p_h_frames, int p_v_frames) = 0; virtual void canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform) = 0; virtual void canvas_item_add_clip_ignore(RID p_item, bool p_ignore) = 0; @@ -856,6 +856,8 @@ public: virtual void canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) = 0; virtual void canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2 &p_rect) = 0; + virtual void canvas_item_attach_skeleton(RID p_item, RID p_skeleton) = 0; + virtual void canvas_item_clear(RID p_item) = 0; virtual void canvas_item_set_draw_index(RID p_item, int p_index) = 0; |