mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[ue4] Call computeWorldVertices before fetching renderer object. See #2154.
This commit is contained in:
parent
d890eed2dc
commit
25719370c7
@ -274,8 +274,8 @@ void SSpineWidget::UpdateMesh(int32 LayerId, FSlateWindowElementList &OutDrawEle
|
|||||||
if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
|
if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
|
||||||
RegionAttachment *regionAttachment = (RegionAttachment *) attachment;
|
RegionAttachment *regionAttachment = (RegionAttachment *) attachment;
|
||||||
attachmentColor.set(regionAttachment->getColor());
|
attachmentColor.set(regionAttachment->getColor());
|
||||||
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRendererObject();
|
|
||||||
regionAttachment->computeWorldVertices(*slot, *attachmentVertices, 0, 2);
|
regionAttachment->computeWorldVertices(*slot, *attachmentVertices, 0, 2);
|
||||||
|
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRendererObject();
|
||||||
attachmentIndices = quadIndices;
|
attachmentIndices = quadIndices;
|
||||||
attachmentUvs = regionAttachment->getUVs().buffer();
|
attachmentUvs = regionAttachment->getUVs().buffer();
|
||||||
numVertices = 4;
|
numVertices = 4;
|
||||||
@ -283,8 +283,8 @@ void SSpineWidget::UpdateMesh(int32 LayerId, FSlateWindowElementList &OutDrawEle
|
|||||||
} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
|
} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
|
||||||
MeshAttachment *mesh = (MeshAttachment *) attachment;
|
MeshAttachment *mesh = (MeshAttachment *) attachment;
|
||||||
attachmentColor.set(mesh->getColor());
|
attachmentColor.set(mesh->getColor());
|
||||||
attachmentAtlasRegion = (AtlasRegion *) mesh->getRendererObject();
|
|
||||||
mesh->computeWorldVertices(*slot, 0, mesh->getWorldVerticesLength(), attachmentVertices->buffer(), 0, 2);
|
mesh->computeWorldVertices(*slot, 0, mesh->getWorldVerticesLength(), attachmentVertices->buffer(), 0, 2);
|
||||||
|
attachmentAtlasRegion = (AtlasRegion *) mesh->getRendererObject();
|
||||||
attachmentIndices = mesh->getTriangles().buffer();
|
attachmentIndices = mesh->getTriangles().buffer();
|
||||||
attachmentUvs = mesh->getUVs().buffer();
|
attachmentUvs = mesh->getUVs().buffer();
|
||||||
numVertices = mesh->getWorldVerticesLength() >> 1;
|
numVertices = mesh->getWorldVerticesLength() >> 1;
|
||||||
|
|||||||
@ -236,8 +236,8 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton *Skeleton) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
attachmentColor.set(regionAttachment->getColor());
|
attachmentColor.set(regionAttachment->getColor());
|
||||||
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRendererObject();
|
|
||||||
regionAttachment->computeWorldVertices(*slot, *attachmentVertices, 0, 2);
|
regionAttachment->computeWorldVertices(*slot, *attachmentVertices, 0, 2);
|
||||||
|
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRendererObject();
|
||||||
attachmentIndices = quadIndices;
|
attachmentIndices = quadIndices;
|
||||||
attachmentUvs = regionAttachment->getUVs().buffer();
|
attachmentUvs = regionAttachment->getUVs().buffer();
|
||||||
numVertices = 4;
|
numVertices = 4;
|
||||||
@ -252,8 +252,8 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton *Skeleton) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
attachmentColor.set(mesh->getColor());
|
attachmentColor.set(mesh->getColor());
|
||||||
attachmentAtlasRegion = (AtlasRegion *) mesh->getRendererObject();
|
|
||||||
mesh->computeWorldVertices(*slot, 0, mesh->getWorldVerticesLength(), attachmentVertices->buffer(), 0, 2);
|
mesh->computeWorldVertices(*slot, 0, mesh->getWorldVerticesLength(), attachmentVertices->buffer(), 0, 2);
|
||||||
|
attachmentAtlasRegion = (AtlasRegion *) mesh->getRendererObject();
|
||||||
attachmentIndices = mesh->getTriangles().buffer();
|
attachmentIndices = mesh->getTriangles().buffer();
|
||||||
attachmentUvs = mesh->getUVs().buffer();
|
attachmentUvs = mesh->getUVs().buffer();
|
||||||
numVertices = mesh->getWorldVerticesLength() >> 1;
|
numVertices = mesh->getWorldVerticesLength() >> 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user