You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix drawing of 2D skeletons in the RD renderer.
Also clean up skeleton code in preparation for adding them to GLES3 Properly update Mesh2D AABBs when skeleton is updated
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
#include "servers/rendering/rendering_server_globals.h"
|
||||
|
||||
const Rect2 &RendererCanvasRender::Item::get_rect() const {
|
||||
if (custom_rect || (!rect_dirty && !update_when_visible)) {
|
||||
if (custom_rect || (!rect_dirty && !update_when_visible && skeleton == RID())) {
|
||||
return rect;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ const Rect2 &RendererCanvasRender::Item::get_rect() const {
|
||||
} break;
|
||||
case Item::Command::TYPE_MESH: {
|
||||
const Item::CommandMesh *mesh = static_cast<const Item::CommandMesh *>(c);
|
||||
AABB aabb = RSG::mesh_storage->mesh_get_aabb(mesh->mesh, RID());
|
||||
AABB aabb = RSG::mesh_storage->mesh_get_aabb(mesh->mesh, skeleton);
|
||||
|
||||
r = Rect2(aabb.position.x, aabb.position.y, aabb.size.x, aabb.size.y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user