mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ue4][cpp] Fix TextureFilter name conflict in UE4 unity builds
We renamed TextureFilter to SpineTextureFilter in UE4 builds to resolve the name collision with UE4's TextureFilter.
This commit is contained in:
parent
8910c458e8
commit
6ff8b8d415
@ -48,7 +48,15 @@ namespace spine {
|
||||
Format_RGBA8888
|
||||
};
|
||||
|
||||
enum TextureFilter {
|
||||
// Our TextureFilter collides with UE4's TextureFilter in unity builds. We rename
|
||||
// TextureFilter to SpineTextureFilter in UE4.
|
||||
#ifdef SPINE_UE4
|
||||
#define TEXTURE_FILTER_ENUM SpineTextureFilter
|
||||
#else
|
||||
#define TEXTURE_FILTER_ENUM TextureFilter
|
||||
#endif
|
||||
|
||||
enum TEXTURE_FILTER_ENUM {
|
||||
TextureFilter_Unknown,
|
||||
TextureFilter_Nearest,
|
||||
TextureFilter_Linear,
|
||||
@ -70,8 +78,8 @@ namespace spine {
|
||||
String name;
|
||||
String texturePath;
|
||||
Format format;
|
||||
TextureFilter minFilter;
|
||||
TextureFilter magFilter;
|
||||
SpineTextureFilter minFilter;
|
||||
SpineTextureFilter magFilter;
|
||||
TextureWrap uWrap;
|
||||
TextureWrap vWrap;
|
||||
int width, height;
|
||||
|
||||
@ -30,10 +30,6 @@
|
||||
#ifndef Spine_SequenceTimeline_h
|
||||
#define Spine_SequenceTimeline_h
|
||||
|
||||
#ifdef SPINE_UE4
|
||||
#include "SpinePluginPrivatePCH.h"
|
||||
#endif
|
||||
|
||||
#include <spine/Timeline.h>
|
||||
#include <spine/Sequence.h>
|
||||
|
||||
|
||||
@ -268,8 +268,8 @@ void Atlas::load(const char *begin, int length, const char *dir, bool createText
|
||||
} else if (entry[0].equals("format")) {
|
||||
page->format = (Format) indexOf(formatNames, 8, &entry[1]);
|
||||
} else if (entry[0].equals("filter")) {
|
||||
page->minFilter = (TextureFilter) indexOf(textureFilterNames, 8, &entry[1]);
|
||||
page->magFilter = (TextureFilter) indexOf(textureFilterNames, 8, &entry[2]);
|
||||
page->minFilter = (TEXTURE_FILTER_ENUM) indexOf(textureFilterNames, 8, &entry[1]);
|
||||
page->magFilter = (TEXTURE_FILTER_ENUM) indexOf(textureFilterNames, 8, &entry[2]);
|
||||
} else if (entry[0].equals("repeat")) {
|
||||
page->uWrap = TextureWrap_ClampToEdge;
|
||||
page->vWrap = TextureWrap_ClampToEdge;
|
||||
|
||||
@ -15,7 +15,8 @@ namespace UnrealBuildTool.Rules
|
||||
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private"));
|
||||
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/spine-cpp/include"));
|
||||
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "ProceduralMeshComponent", "UMG", "Slate", "SlateCore" });
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "ProceduralMeshComponent", "UMG", "Slate", "SlateCore" });
|
||||
PublicDefinitions.Add("SPINE_UE4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user