mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 14:41:07 +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:
parent
c9c09ad608
commit
0e5a98cdd8
9 changed files with 15 additions and 111 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue