mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[ue4] Fixed #1421, SlateIndex is 32-bit on the desktop and 16-bit on mobile. Memcpy assumed 32-bit.
This commit is contained in:
parent
904b7ce40a
commit
698715789f
@ -180,9 +180,11 @@ void SSpineWidget::Flush(int32 LayerId, FSlateWindowElementList& OutDrawElements
|
||||
}
|
||||
|
||||
self->renderData.IndexData.SetNumUninitialized(Indices.Num());
|
||||
uint32* indexData = (uint32*)renderData.IndexData.GetData();
|
||||
memcpy(indexData, Indices.GetData(), sizeof(uint32) * Indices.Num());
|
||||
|
||||
SlateIndex* indexData = (SlateIndex*)renderData.IndexData.GetData();
|
||||
for (int i = 0; i < Indices.Num(); i++) {
|
||||
indexData[i] = (SlateIndex)Indices[i];
|
||||
}
|
||||
|
||||
self->renderData.VertexData.SetNumUninitialized(Vertices.Num());
|
||||
FSlateVertex* vertexData = (FSlateVertex*)renderData.VertexData.GetData();
|
||||
FVector2D offset = AllottedGeometry.AbsolutePosition;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user