Files
UnrealEngineUWP/Engine/Source/Runtime/GameplayMediaEncoder/Private/Microsoft/Windows/EncoderDevice.cpp
josh adams 019c12863e - Merging Dev-Kairos/Engine/... to Main/Engine/...
- Brings over the necessary engine changes for embedding UE4 mobile as a dylib/so in native mobile app
- Various changes for facial animation, screen recording, others
- ARKit and ARCore plugins were removed, as deemed "not ready"
#rb many people

#ROBOMERGE-OWNER: ryan.vance
#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 5201138 via CL 5203024 via CL 5226277
#ROBOMERGE-BOT: DEVVR (Main -> Dev-VR)

[CL 5244512 by josh adams in Dev-VR branch]
2019-02-28 17:06:02 -05:00

47 lines
1.0 KiB
C++

// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#include "EncoderDevice.h"
#if PLATFORM_WINDOWS
FEncoderDevice::FEncoderDevice()
{
if (GDynamicRHI)
{
ID3D11Device* D3D11Device = GetUE4DxDevice();
IDXGIDevice* DXGIDevice = nullptr;
CHECK_HR_VOID(D3D11Device->QueryInterface(__uuidof(IDXGIDevice), (LPVOID*)&DXGIDevice));
IDXGIAdapter* Adapter;
CHECK_HR_VOID(DXGIDevice->GetAdapter(&Adapter));
D3D_DRIVER_TYPE DriverType = D3D_DRIVER_TYPE_UNKNOWN;
uint32 DeviceFlags = D3D11Device->GetCreationFlags();
D3D_FEATURE_LEVEL FeatureLevel = D3D11Device->GetFeatureLevel();
D3D_FEATURE_LEVEL ActualFeatureLevel;
CHECK_HR_VOID(D3D11CreateDevice(
Adapter,
DriverType,
NULL,
DeviceFlags,
&FeatureLevel,
1,
D3D11_SDK_VERSION,
Device.GetInitReference(),
&ActualFeatureLevel,
DeviceContext.GetInitReference()
));
DXGIDevice->Release();
}
else
{
UE_LOG(GameplayMediaEncoder, Error, TEXT("Attempting to create Encoder Device without existing RHI"));
}
}
#endif