mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-12 01:58:45 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
8e586b6d38
@ -58,3 +58,5 @@ SyncSceneSmoothingFactor=0.000000
|
||||
InitialAverageFrameRate=0.016667
|
||||
PhysXTreeRebuildRate=10
|
||||
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)
|
||||
|
||||
|
||||
|
||||
@ -45,6 +45,15 @@
|
||||
|
||||
using namespace spine;
|
||||
|
||||
// Workaround for https://github.com/EsotericSoftware/spine-runtimes/issues/1458
|
||||
// See issue comments for more information.
|
||||
struct SpineSlateMaterialBrush : public FSlateBrush {
|
||||
SpineSlateMaterialBrush(class UMaterialInterface &InMaterial, const FVector2D &InImageSize)
|
||||
: FSlateBrush(ESlateBrushDrawType::Image, FName(TEXT("None")), FMargin(0), ESlateBrushTileType::NoTile, ESlateBrushImageType::FullColor, InImageSize, FLinearColor::White, &InMaterial) {
|
||||
ResourceName = FName(*InMaterial.GetFullName());
|
||||
}
|
||||
};
|
||||
|
||||
void SSpineWidget::Construct(const FArguments& args) {
|
||||
}
|
||||
|
||||
@ -197,7 +206,7 @@ void SSpineWidget::Flush(int32 LayerId, FSlateWindowElementList& OutDrawElements
|
||||
|
||||
brush = &widget->Brush;
|
||||
if (Material) {
|
||||
renderData.Brush = MakeShareable(new FSlateMaterialBrush(*Material, FVector2D(64, 64)));
|
||||
renderData.Brush = MakeShareable(new SpineSlateMaterialBrush(*Material, FVector2D(64, 64)));
|
||||
renderData.RenderingResourceHandle = FSlateApplication::Get().GetRenderer()->GetResourceHandle(*renderData.Brush);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user