Merge branch 'xboxone' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-xboxone
This commit is contained in:
@@ -1 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#define COMPILE_WITH_DEV_ENV 0
|
||||
#define OFFICIAL_BUILD 1
|
||||
|
||||
@@ -49,12 +49,14 @@ IMPLEMENT_SETTINGS_GETTER(StreamingSettings, Streaming);
|
||||
#if !USE_EDITOR
|
||||
#if PLATFORM_WINDOWS
|
||||
IMPLEMENT_SETTINGS_GETTER(WindowsPlatformSettings, WindowsPlatform);
|
||||
#elif PLATFORM_UWP || PLATFORM_XBOX_ONE
|
||||
#elif PLATFORM_UWP
|
||||
IMPLEMENT_SETTINGS_GETTER(UWPPlatformSettings, UWPPlatform);
|
||||
#elif PLATFORM_LINUX
|
||||
IMPLEMENT_SETTINGS_GETTER(LinuxPlatformSettings, LinuxPlatform);
|
||||
#elif PLATFORM_PS4
|
||||
IMPLEMENT_SETTINGS_GETTER(PS4PlatformSettings, PS4Platform);
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
IMPLEMENT_SETTINGS_GETTER(XboxOnePlatformSettings, XboxOnePlatform);
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
IMPLEMENT_SETTINGS_GETTER(XboxScarlettPlatformSettings, XboxScarlettPlatform);
|
||||
#elif PLATFORM_ANDROID
|
||||
@@ -217,6 +219,7 @@ void GameSettings::Deserialize(DeserializeStream& stream, ISerializeModifier* mo
|
||||
DESERIALIZE(UWPPlatform);
|
||||
DESERIALIZE(LinuxPlatform);
|
||||
DESERIALIZE(PS4Platform);
|
||||
DESERIALIZE(XboxOnePlatform);
|
||||
DESERIALIZE(XboxScarlettPlatform);
|
||||
DESERIALIZE(AndroidPlatform);
|
||||
DESERIALIZE(SwitchPlatform);
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace FlaxEditor.Content.Settings
|
||||
partial class GameSettings
|
||||
{
|
||||
internal const string PS4PlatformSettingsTypename = "FlaxEditor.Content.Settings.PS4PlatformSettings";
|
||||
internal const string XboxOnePlatformSettingsTypename = "FlaxEditor.Content.Settings.XboxOnePlatformSettings";
|
||||
internal const string XboxScarlettPlatformSettingsTypename = "FlaxEditor.Content.Settings.XboxScarlettPlatformSettings";
|
||||
internal const string SwitchPlatformSettingsTypename = "FlaxEditor.Content.Settings.SwitchPlatformSettings";
|
||||
|
||||
@@ -111,7 +112,7 @@ namespace FlaxEditor.Content.Settings
|
||||
public JsonAsset WindowsPlatform;
|
||||
#endif
|
||||
|
||||
#if FLAX_EDITOR || PLATFORM_UWP || PLATFORM_XBOX_ONE
|
||||
#if FLAX_EDITOR || PLATFORM_UWP
|
||||
/// <summary>
|
||||
/// Reference to <see cref="UWPPlatformSettings"/> asset. Used to apply configuration on Universal Windows Platform.
|
||||
/// </summary>
|
||||
@@ -135,6 +136,14 @@ namespace FlaxEditor.Content.Settings
|
||||
public JsonAsset PS4Platform;
|
||||
#endif
|
||||
|
||||
#if FLAX_EDITOR || PLATFORM_XBOX_ONE
|
||||
/// <summary>
|
||||
/// Reference to Xbox One Platform Settings asset. Used to apply configuration on Xbox ScOnearlett platform.
|
||||
/// </summary>
|
||||
[EditorOrder(2050), EditorDisplay("Platform Settings", "Xbox One"), AssetReference(XboxOnePlatformSettingsTypename, true), Tooltip("Reference to Xbox One Platform Settings asset")]
|
||||
public JsonAsset XboxOnePlatform;
|
||||
#endif
|
||||
|
||||
#if FLAX_EDITOR || PLATFORM_XBOX_SCARLETT
|
||||
/// <summary>
|
||||
/// Reference to Xbox Scarlett Platform Settings asset. Used to apply configuration on Xbox Scarlett platform.
|
||||
@@ -245,7 +254,7 @@ namespace FlaxEditor.Content.Settings
|
||||
if (type == typeof(WindowsPlatformSettings))
|
||||
return LoadAsset<WindowsPlatformSettings>(gameSettings.WindowsPlatform) as T;
|
||||
#endif
|
||||
#if FLAX_EDITOR || PLATFORM_UWP || PLATFORM_XBOX_ONE
|
||||
#if FLAX_EDITOR || PLATFORM_UWP
|
||||
if (type == typeof(UWPPlatformSettings))
|
||||
return LoadAsset<UWPPlatformSettings>(gameSettings.UWPPlatform) as T;
|
||||
#endif
|
||||
@@ -257,6 +266,10 @@ namespace FlaxEditor.Content.Settings
|
||||
if (type.FullName == PS4PlatformSettingsTypename)
|
||||
return LoadAsset(gameSettings.PS4Platform, PS4PlatformSettingsTypename) as T;
|
||||
#endif
|
||||
#if FLAX_EDITOR || PLATFORM_XBOX_ONE
|
||||
if (type.FullName == XboxOnePlatformSettingsTypename)
|
||||
return LoadAsset(gameSettings.XboxOnePlatform, XboxOnePlatformSettingsTypename) as T;
|
||||
#endif
|
||||
#if FLAX_EDITOR || PLATFORM_XBOX_SCARLETT
|
||||
if (type.FullName == XboxScarlettPlatformSettingsTypename)
|
||||
return LoadAsset(gameSettings.XboxScarlettPlatform, XboxScarlettPlatformSettingsTypename) as T;
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
Guid UWPPlatform;
|
||||
Guid LinuxPlatform;
|
||||
Guid PS4Platform;
|
||||
Guid XboxOnePlatform;
|
||||
Guid XboxScarlettPlatform;
|
||||
Guid AndroidPlatform;
|
||||
Guid SwitchPlatform;
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
#if PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Platform/PS4PlatformSettings.h"
|
||||
#endif
|
||||
#if PLATFORM_XBOX_ONE
|
||||
#include "Platforms/XboxOne/Engine/Platform/XboxOnePlatformSettings.h"
|
||||
#endif
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#include "Platforms/XboxScarlett/Engine/Platform/XboxScarlettPlatformSettings.h"
|
||||
#endif
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "Linux/LinuxGame.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Engine/PS4Game.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Platforms/XboxOne/Engine/Engine/XboxOneGame.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Platforms/XboxScarlett/Engine/Engine/XboxScarlettGame.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -55,11 +55,11 @@ public class Graphics : EngineModule
|
||||
else
|
||||
Log.WarningOnce("Building for Windows without DirectX 12 rendering backend (Windows 10 SDK is required)", ref _logMissingWindowsSDK);
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.UWP:
|
||||
options.PrivateDependencies.Add("GraphicsDeviceDX11");
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.PrivateDependencies.Add("GraphicsDeviceDX12");
|
||||
break;
|
||||
case TargetPlatform.Linux:
|
||||
|
||||
@@ -155,6 +155,14 @@ bool GraphicsService::Init()
|
||||
device = CreateGPUDevicePS4();
|
||||
#endif
|
||||
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
|
||||
// Xbox One
|
||||
#if GRAPHICS_API_DIRECTX12
|
||||
if (!device)
|
||||
device = CreateGPUDeviceDX12();
|
||||
#endif
|
||||
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
|
||||
// Xbox Scarlett
|
||||
|
||||
@@ -78,9 +78,7 @@ static bool TryCreateDevice(IDXGIAdapter* adapter, D3D_FEATURE_LEVEL maxFeatureL
|
||||
GPUDevice* GPUDeviceDX11::Create()
|
||||
{
|
||||
// Configuration
|
||||
#if PLATFORM_XBOX_ONE
|
||||
D3D_FEATURE_LEVEL maxAllowedFeatureLevel = D3D_FEATURE_LEVEL_10_0;
|
||||
#elif DX11_FORCE_USE_DX10
|
||||
#if DX11_FORCE_USE_DX10
|
||||
D3D_FEATURE_LEVEL maxAllowedFeatureLevel = D3D_FEATURE_LEVEL_10_0;
|
||||
#elif DX11_FORCE_USE_DX10_1
|
||||
D3D_FEATURE_LEVEL maxAllowedFeatureLevel = D3D_FEATURE_LEVEL_10_1;
|
||||
|
||||
@@ -109,7 +109,7 @@ bool GPUBufferDX12::OnInit()
|
||||
resourceDesc.Flags |= D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE;
|
||||
if (useUAV)
|
||||
resourceDesc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
if (_desc.Flags & GPUBufferFlags::Argument)
|
||||
resourceDesc.Flags |= D3D12XBOX_RESOURCE_FLAG_ALLOW_INDIRECT_BUFFER;
|
||||
#endif
|
||||
|
||||
@@ -904,7 +904,7 @@ void GPUContextDX12::BindVB(const Span<GPUBuffer*>& vertexBuffers, const uint32*
|
||||
{
|
||||
_vbCount = vertexBuffers.Length();
|
||||
Platform::MemoryCopy(_vbViews, views, sizeof(views));
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
if (vertexBuffers.Length() == 0)
|
||||
return;
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@ static bool CheckDX12Support(IDXGIAdapter* adapter)
|
||||
|
||||
GPUDevice* GPUDeviceDX12::Create()
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
IDXGIFactory4* dxgiFactory = nullptr;
|
||||
GPUAdapterDX selectedAdapter;
|
||||
selectedAdapter.Index = 0;
|
||||
@@ -204,11 +204,17 @@ namespace XboxScarlett
|
||||
extern Action OnSuspend;
|
||||
extern Action OnResume;
|
||||
}
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
namespace XboxOne
|
||||
{
|
||||
extern Action OnSuspend;
|
||||
extern Action OnResume;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool GPUDeviceDX12::Init()
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
// Create DirectX device
|
||||
D3D12XBOX_CREATE_DEVICE_PARAMETERS params = {};
|
||||
params.Version = D3D12_SDK_VERSION;
|
||||
@@ -220,7 +226,9 @@ bool GPUDeviceDX12::Init()
|
||||
params.GraphicsCommandQueueRingSizeBytes = static_cast<UINT>(D3D12XBOX_DEFAULT_SIZE_BYTES);
|
||||
params.GraphicsScratchMemorySizeBytes = static_cast<UINT>(D3D12XBOX_DEFAULT_SIZE_BYTES);
|
||||
params.ComputeScratchMemorySizeBytes = static_cast<UINT>(D3D12XBOX_DEFAULT_SIZE_BYTES);
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
params.DisableDXR = TRUE;
|
||||
#endif
|
||||
VALIDATE_DIRECTX_RESULT(D3D12XboxCreateDevice(nullptr, ¶ms, IID_GRAPHICS_PPV_ARGS(&_device)));
|
||||
|
||||
// Setup adapter
|
||||
@@ -255,8 +263,14 @@ bool GPUDeviceDX12::Init()
|
||||
}
|
||||
LOG(Info, "Hardware Version: {0}", hwVer);
|
||||
updateFrameEvents();
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
XboxScarlett::OnSuspend.Bind<GPUDeviceDX12, &GPUDeviceDX12::OnSuspend>(this);
|
||||
XboxScarlett::OnResume.Bind<GPUDeviceDX12, &GPUDeviceDX12::OnResume>(this);
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
XboxOne::OnSuspend.Bind<GPUDeviceDX12, &GPUDeviceDX12::OnSuspend>(this);
|
||||
XboxOne::OnResume.Bind<GPUDeviceDX12, &GPUDeviceDX12::OnResume>(this);
|
||||
#endif
|
||||
#else
|
||||
// Get DXGI adapter
|
||||
IDXGIAdapter1* adapter;
|
||||
@@ -839,7 +853,7 @@ void GPUDeviceDX12::updateRes2Dispose()
|
||||
_res2DisposeLock.Unlock();
|
||||
}
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
|
||||
void GPUDeviceDX12::OnSuspend()
|
||||
{
|
||||
|
||||
@@ -157,14 +157,14 @@ public:
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT ||PLATFORM_XBOX_ONE
|
||||
void OnSuspend();
|
||||
void OnResume();
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT ||PLATFORM_XBOX_ONE
|
||||
void updateFrameEvents();
|
||||
#endif
|
||||
void updateRes2Dispose();
|
||||
|
||||
@@ -89,7 +89,7 @@ void GPUSwapChainDX12::releaseBackBuffer()
|
||||
|
||||
bool GPUSwapChainDX12::IsFullscreen()
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
return true;
|
||||
#else
|
||||
// Check if has no swap chain created
|
||||
@@ -154,7 +154,7 @@ bool GPUSwapChainDX12::Resize(int32 width, int32 height)
|
||||
_allowTearing = _device->AllowTearing;
|
||||
_format = GPU_BACK_BUFFER_PIXEL_FORMAT;
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
ReleaseGPU();
|
||||
|
||||
_currentFrameIndex = 0;
|
||||
@@ -283,7 +283,7 @@ void GPUSwapChainDX12::getBackBuffer()
|
||||
for (int32 i = 0; i < _backBuffers.Count(); i++)
|
||||
{
|
||||
ID3D12Resource* backbuffer;
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
D3D12_HEAP_PROPERTIES swapChainHeapProperties;
|
||||
swapChainHeapProperties.Type = D3D12_HEAP_TYPE_DEFAULT;
|
||||
swapChainHeapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
|
||||
@@ -319,7 +319,7 @@ void GPUSwapChainDX12::getBackBuffer()
|
||||
}
|
||||
}
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
|
||||
void GPUSwapChainDX12::Begin(RenderTask* task)
|
||||
{
|
||||
@@ -348,7 +348,7 @@ void GPUSwapChainDX12::End(RenderTask* task)
|
||||
|
||||
void GPUSwapChainDX12::Present(bool vsync)
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
ID3D12Resource* backBuffer = _backBuffers[_currentFrameIndex].GetResource();
|
||||
D3D12XBOX_PRESENT_PLANE_PARAMETERS planeParameters = {};
|
||||
planeParameters.Token = _framePipelineToken;
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
HWND _windowHandle;
|
||||
IDXGISwapChain3* _swapChain;
|
||||
int32 _currentFrameIndex;
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
D3D12XBOX_FRAME_PIPELINE_TOKEN _framePipelineToken;
|
||||
#endif
|
||||
Array<BackBufferDX12, FixedAllocation<4>> _backBuffers;
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
bool IsFullscreen() override;
|
||||
void SetFullscreen(bool isFullscreen) override;
|
||||
GPUTextureView* GetBackBufferView() override;
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
void Begin(RenderTask* task) override;
|
||||
#endif
|
||||
void End(RenderTask* task) override;
|
||||
|
||||
@@ -22,13 +22,16 @@ public class GraphicsDeviceDX12 : GraphicsDeviceBaseModule
|
||||
options.PublicDefinitions.Add("GRAPHICS_API_DIRECTX12");
|
||||
switch (options.Platform.Target)
|
||||
{
|
||||
case TargetPlatform.Windows:
|
||||
options.OutputFiles.Add("d3d12.lib");
|
||||
options.DelayLoadLibraries.Add("d3d12.dll");
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.OutputFiles.Add("d3d12_xs.lib");
|
||||
break;
|
||||
case TargetPlatform.Windows:
|
||||
options.OutputFiles.Add("d3d12.lib");
|
||||
options.DelayLoadLibraries.Add("d3d12.dll");
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
options.OutputFiles.Add("d3d12_x.lib");
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.OutputFiles.Add("d3d12_xs.lib");
|
||||
break;
|
||||
}
|
||||
|
||||
if (UseWinPixEventRuntime)
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
// D3D11 and D3D12
|
||||
#if GRAPHICS_API_DIRECTX11 || GRAPHICS_API_DIRECTX12
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#include <Scarlett/d3d12_xs.h>
|
||||
#else
|
||||
#include <XboxOne/d3d12_x.h>
|
||||
#endif
|
||||
typedef IGraphicsUnknown IDXGIFactory4;
|
||||
typedef IGraphicsUnknown IDXGISwapChain3;
|
||||
#define D3D12_TEXTURE_DATA_PITCH_ALIGNMENT 256
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace RenderToolsDX
|
||||
template<typename T>
|
||||
inline void SetDebugObjectName(T* resource, const char* data, UINT size)
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
const StringAsUTF16<> nameUTF16(data, size);
|
||||
resource->SetName(nameUTF16.Get());
|
||||
#else
|
||||
@@ -331,7 +331,7 @@ inline void SetDebugObjectName(ID3D11DeviceChild* resource, const char(&name)[Na
|
||||
template<uint32 NameLength>
|
||||
inline void SetDebugObjectName(ID3D12DeviceChild* resource, const char (&name)[NameLength])
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
const StringAsUTF16<> nameUTF16(name);
|
||||
resource->SetName(nameUTF16.Get());
|
||||
#else
|
||||
@@ -362,7 +362,7 @@ inline void SetDebugObjectName(ID3D11Resource* resource, const char(&name)[NameL
|
||||
template<uint32 NameLength>
|
||||
inline void SetDebugObjectName(ID3D12Resource* resource, const char (&name)[NameLength])
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
const StringAsUTF16<> nameUTF16(name);
|
||||
resource->SetName(nameUTF16.Get());
|
||||
#else
|
||||
@@ -383,7 +383,7 @@ inline void SetDebugObjectName(ComPtr<T> resource, const char (&name)[NameLength
|
||||
template<typename T>
|
||||
inline void SetDebugObjectName(T* resource, const Char* data, UINT size)
|
||||
{
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
if (data && size > 0)
|
||||
resource->SetName(data);
|
||||
#else
|
||||
|
||||
@@ -43,7 +43,6 @@ public class Main : EngineModule
|
||||
}*/
|
||||
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.UWP:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "UWP"));
|
||||
|
||||
@@ -58,7 +57,10 @@ public class Main : EngineModule
|
||||
case TargetPlatform.PS4:
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Main"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
case TargetPlatform.XboxOne:
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Main"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxScarlett", "Engine", "Main"));
|
||||
break;
|
||||
case TargetPlatform.Android:
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Linux/LinuxClipboard.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Base/ClipboardBase.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Base/ClipboardBase.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Base/ClipboardBase.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Unix/UnixConditionVariable.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Unix/UnixConditionVariable.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Win32/Win32ConditionVariable.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Win32/Win32ConditionVariable.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Unix/UnixCriticalSection.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Unix/UnixCriticalSection.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Win32/Win32CriticalSection.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Win32/Win32CriticalSection.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -130,6 +130,8 @@ API_ENUM() enum class ArchitectureType
|
||||
#include "Linux/LinuxDefines.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Platform/PS4Defines.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Platforms/XboxOne/Engine/Platform/XboxOneDefines.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Platforms/XboxScarlett/Engine/Platform/XboxScarlettDefines.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
@@ -175,7 +177,7 @@ API_ENUM() enum class ArchitectureType
|
||||
|
||||
// Platform family defines
|
||||
#define PLATFORM_WINDOWS_FAMILY (PLATFORM_WINDOWS || PLATFORM_UWP)
|
||||
#define PLATFORM_MICROSOFT_FAMILY (PLATFORM_WINDOWS_FAMILY || PLATFORM_XBOX_ONE)
|
||||
#define PLATFORM_MICROSOFT_FAMILY (PLATFORM_WINDOWS_FAMILY)
|
||||
#define PLATFORM_UNIX_FAMILY (PLATFORM_LINUX || PLATFORM_ANDROID || PLATFORM_PS4)
|
||||
#define PLATFORM_APPLE_FAMILY (PLATFORM_IOS || PLATFORM_OSX)
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Unix/UnixFile.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Unix/UnixFile.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Win32/Win32File.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Win32/Win32File.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Linux/LinuxFileSystem.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Platform/PS4FileSystem.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Platforms/XboxOne/Engine/Platform/XboxOneFileSystem.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Platforms/XboxScarlett/Engine/Platform/XboxScarlettFileSystem.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Unix/UnixNetwork.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Platform/PS4Network.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Win32/Win32Network.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Win32/Win32Network.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -44,7 +44,6 @@ public class Platform : EngineModule
|
||||
options.Libraries.Add("Dwmapi.dll");
|
||||
}
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.UWP:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Win32"));
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "UWP"));
|
||||
@@ -57,7 +56,11 @@ public class Platform : EngineModule
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Unix"));
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Platform"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
case TargetPlatform.XboxOne:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Win32"));
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Platform"));
|
||||
break;
|
||||
case TargetPlatform.XboxScarlett:
|
||||
options.SourcePaths.Add(Path.Combine(FolderPath, "Win32"));
|
||||
options.SourcePaths.Add(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxScarlett", "Engine", "Platform"));
|
||||
break;
|
||||
@@ -77,6 +80,7 @@ public class Platform : EngineModule
|
||||
options.SourceFiles.Add(Path.Combine(FolderPath, "UWP", "UWPPlatformSettings.h"));
|
||||
options.SourceFiles.Add(Path.Combine(FolderPath, "Linux", "LinuxPlatformSettings.h"));
|
||||
options.SourceFiles.Add(Path.Combine(FolderPath, "Android", "AndroidPlatformSettings.h"));
|
||||
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxOne", "Engine", "Platform", "XboxOnePlatformSettings.h"));
|
||||
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "XboxScarlett", "Engine", "Platform", "XboxScarlettPlatformSettings.h"));
|
||||
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "PS4", "Engine", "Platform", "PS4PlatformSettings.h"));
|
||||
AddSourceFileIfExists(options, Path.Combine(Globals.EngineRoot, "Source", "Platforms", "Switch", "Engine", "Platform", "SwitchPlatformSettings.h"));
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "Linux/LinuxPlatform.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Platform/PS4Platform.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Platforms/XboxOne/Engine/Platform/XboxOnePlatform.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Platforms/XboxScarlett/Engine/Platform/XboxScarlettPlatform.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Linux/LinuxThread.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Platform/PS4Thread.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Win32/Win32Thread.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Win32/Win32Thread.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -93,6 +93,28 @@ class PS4Window;
|
||||
typedef PS4Window Window;
|
||||
class PS4Network;
|
||||
typedef PS4Network Network;
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
|
||||
class ClipboardBase;
|
||||
typedef ClipboardBase Clipboard;
|
||||
class Win32CriticalSection;
|
||||
typedef Win32CriticalSection CriticalSection;
|
||||
class Win32ConditionVariable;
|
||||
typedef Win32ConditionVariable ConditionVariable;
|
||||
class XboxOneFileSystem;
|
||||
typedef XboxOneFileSystem FileSystem;
|
||||
class FileSystemWatcherBase;
|
||||
typedef FileSystemWatcherBase FileSystemWatcher;
|
||||
class Win32File;
|
||||
typedef Win32File File;
|
||||
class XboxOnePlatform;
|
||||
typedef XboxOnePlatform Platform;
|
||||
class Win32Thread;
|
||||
typedef Win32Thread Thread;
|
||||
class XboxOneWindow;
|
||||
typedef XboxOneWindow Window;
|
||||
class NetworkBase;
|
||||
typedef NetworkBase Network;
|
||||
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
|
||||
|
||||
@@ -7,11 +7,7 @@
|
||||
#include "../Win32/Win32Defines.h"
|
||||
|
||||
// Platform description
|
||||
#if PLATFORM_XBOX_ONE
|
||||
#define PLATFORM_TYPE PlatformType::XboxOne
|
||||
#else
|
||||
#define PLATFORM_TYPE PlatformType::UWP
|
||||
#endif
|
||||
|
||||
// Use AOT for Mono
|
||||
#define USE_MONO_AOT 1
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#endif
|
||||
|
||||
// Override for Xbox Scarlett
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
#define NOBITMAP
|
||||
#define NOMCX
|
||||
#define NOSERVICE
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "Linux/LinuxWindow.h"
|
||||
#elif PLATFORM_PS4
|
||||
#include "Platforms/PS4/Engine/Platform/PS4Window.h"
|
||||
#elif PLATFORM_XBOX_ONE
|
||||
#include "Platforms/XboxOne/Engine/Platform/XboxOneWindow.h"
|
||||
#elif PLATFORM_XBOX_SCARLETT
|
||||
#include "Platforms/XboxScarlett/Engine/Platform/XboxScarlettWindow.h"
|
||||
#elif PLATFORM_ANDROID
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
// Import DirectXTex library
|
||||
// Source: https://github.com/Microsoft/DirectXTex
|
||||
#if PLATFORM_XBOX_SCARLETT
|
||||
#if PLATFORM_XBOX_SCARLETT || PLATFORM_XBOX_ONE
|
||||
#include "Engine/Platform/Win32/IncludeWindowsHeaders.h"
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user