mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[ue4] Fix changes to render object system.
This commit is contained in:
parent
dac3983b62
commit
138db9a473
@ -275,7 +275,7 @@ void SSpineWidget::UpdateMesh(int32 LayerId, FSlateWindowElementList &OutDrawEle
|
||||
RegionAttachment *regionAttachment = (RegionAttachment *) attachment;
|
||||
attachmentColor.set(regionAttachment->getColor());
|
||||
regionAttachment->computeWorldVertices(*slot, *attachmentVertices, 0, 2);
|
||||
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRendererObject();
|
||||
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRegion();
|
||||
attachmentIndices = quadIndices;
|
||||
attachmentUvs = regionAttachment->getUVs().buffer();
|
||||
numVertices = 4;
|
||||
@ -284,7 +284,7 @@ void SSpineWidget::UpdateMesh(int32 LayerId, FSlateWindowElementList &OutDrawEle
|
||||
MeshAttachment *mesh = (MeshAttachment *) attachment;
|
||||
attachmentColor.set(mesh->getColor());
|
||||
mesh->computeWorldVertices(*slot, 0, mesh->getWorldVerticesLength(), attachmentVertices->buffer(), 0, 2);
|
||||
attachmentAtlasRegion = (AtlasRegion *) mesh->getRendererObject();
|
||||
attachmentAtlasRegion = (AtlasRegion *) mesh->getRegion();
|
||||
attachmentIndices = mesh->getTriangles().buffer();
|
||||
attachmentUvs = mesh->getUVs().buffer();
|
||||
numVertices = mesh->getWorldVerticesLength() >> 1;
|
||||
|
||||
@ -109,7 +109,7 @@ Atlas *USpineAtlasAsset::GetAtlas() {
|
||||
for (size_t i = 0, n = pages.size(), j = 0; i < n; i++) {
|
||||
AtlasPage *page = pages[i];
|
||||
if (atlasPages.Num() > 0 && atlasPages.Num() > (int32) i)
|
||||
page->setRendererObject(atlasPages[j++]);
|
||||
page->texture = atlasPages[j++];
|
||||
}
|
||||
}
|
||||
return this->atlas;
|
||||
|
||||
@ -237,7 +237,7 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton *Skeleton) {
|
||||
|
||||
attachmentColor.set(regionAttachment->getColor());
|
||||
regionAttachment->computeWorldVertices(*slot, *attachmentVertices, 0, 2);
|
||||
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRendererObject();
|
||||
attachmentAtlasRegion = (AtlasRegion *) regionAttachment->getRegion();
|
||||
attachmentIndices = quadIndices;
|
||||
attachmentUvs = regionAttachment->getUVs().buffer();
|
||||
numVertices = 4;
|
||||
@ -253,7 +253,7 @@ void USpineSkeletonRendererComponent::UpdateMesh(Skeleton *Skeleton) {
|
||||
|
||||
attachmentColor.set(mesh->getColor());
|
||||
mesh->computeWorldVertices(*slot, 0, mesh->getWorldVerticesLength(), attachmentVertices->buffer(), 0, 2);
|
||||
attachmentAtlasRegion = (AtlasRegion *) mesh->getRendererObject();
|
||||
attachmentAtlasRegion = (AtlasRegion *) mesh->getRegion();
|
||||
attachmentIndices = mesh->getTriangles().buffer();
|
||||
attachmentUvs = mesh->getUVs().buffer();
|
||||
numVertices = mesh->getWorldVerticesLength() >> 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user