summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-25 19:19:23 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-25 19:19:23 +0000
commitd31dc00f82d2121dc0378db77264d9263540a192 (patch)
treed384eb65560a6bef42e339d4393e03b6c9baaa16 /Graphics/GraphicsEngineD3DBase
parentUpdated handling of fatal errors (diff)
downloadDiligentCore-d31dc00f82d2121dc0378db77264d9263540a192.tar.gz
DiligentCore-d31dc00f82d2121dc0378db77264d9263540a192.zip
Reworked main headers to be compatible with c
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h6
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/EngineFactoryD3DBase.h16
2 files changed, 11 insertions, 11 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h b/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h
index dba0e87e..0e2c684d 100644
--- a/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h
+++ b/Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.h
@@ -296,7 +296,7 @@ void BlendStateDescToD3DBlendDesc(const BlendStateDesc& BSDesc, D3D_BLEND_DESC&
// D3D_BLEND_DESC and D3D11_BLEND_DESC structures are identical
d3d12BlendDesc.AlphaToCoverageEnable = BSDesc.AlphaToCoverageEnable ? TRUE : FALSE;
d3d12BlendDesc.IndependentBlendEnable = BSDesc.IndependentBlendEnable ? TRUE : FALSE;
- VERIFY(BSDesc.MaxRenderTargets >= 8, "Number of render targets is expected to be at least 8");
+ VERIFY(MAX_RENDER_TARGETS >= 8, "Number of render targets is expected to be at least 8");
for (int i = 0; i < 8; ++i)
{
const auto& SrcRTDesc = BSDesc.RenderTargets[i];
@@ -400,8 +400,8 @@ void LayoutElements_To_D3D_INPUT_ELEMENT_DESCs(const InputLayoutDesc&
D3DElem.AlignedByteOffset = CurrElem.RelativeOffset;
D3DElem.InputSlot = CurrElem.BufferSlot;
D3DElem.Format = TypeToDXGI_Format(CurrElem.ValueType, CurrElem.NumComponents, CurrElem.IsNormalized);
- D3DElem.InputSlotClass = (CurrElem.Frequency == LayoutElement::FREQUENCY_PER_VERTEX) ? D3D_INPUT_CLASSIFICATION_PER_VERTEX_DATA : D3D_INPUT_CLASSIFICATION_PER_INSTANCE_DATA;
- D3DElem.InstanceDataStepRate = (CurrElem.Frequency == LayoutElement::FREQUENCY_PER_VERTEX) ? 0 : CurrElem.InstanceDataStepRate;
+ D3DElem.InputSlotClass = (CurrElem.Frequency == INPUT_ELEMENT_FREQUENCY_PER_VERTEX) ? D3D_INPUT_CLASSIFICATION_PER_VERTEX_DATA : D3D_INPUT_CLASSIFICATION_PER_INSTANCE_DATA;
+ D3DElem.InstanceDataStepRate = (CurrElem.Frequency == INPUT_ELEMENT_FREQUENCY_PER_VERTEX) ? 0 : CurrElem.InstanceDataStepRate;
}
}
diff --git a/Graphics/GraphicsEngineD3DBase/include/EngineFactoryD3DBase.h b/Graphics/GraphicsEngineD3DBase/include/EngineFactoryD3DBase.h
index 87b4724b..e2f04091 100644
--- a/Graphics/GraphicsEngineD3DBase/include/EngineFactoryD3DBase.h
+++ b/Graphics/GraphicsEngineD3DBase/include/EngineFactoryD3DBase.h
@@ -36,7 +36,7 @@
namespace Diligent
{
-template <typename BaseInterface, DeviceType DevType>
+template <typename BaseInterface, RENDER_DEVICE_TYPE DevType>
class EngineFactoryD3DBase : public EngineFactoryBase<BaseInterface>
{
public:
@@ -131,8 +131,8 @@ public:
DstMode.Format = DXGI_FormatToTexFormat(SrcMode.Format);
DstMode.RefreshRateNumerator = SrcMode.RefreshRate.Numerator;
DstMode.RefreshRateDenominator = SrcMode.RefreshRate.Denominator;
- DstMode.Scaling = static_cast<DisplayModeAttribs::SCALING>(SrcMode.Scaling);
- DstMode.ScanlineOrder = static_cast<DisplayModeAttribs::SCANLINE_ORDER>(SrcMode.ScanlineOrdering);
+ DstMode.Scaling = static_cast<SCALING_MODE>(SrcMode.Scaling);
+ DstMode.ScanlineOrder = static_cast<SCANLINE_ORDER>(SrcMode.ScanlineOrdering);
}
NumDisplayModes = std::min(NumDisplayModes, numModes);
}
@@ -194,13 +194,13 @@ protected:
}
private:
- template <DeviceType DevType>
+ template <RENDER_DEVICE_TYPE DevType>
bool CheckAdapterCompatibility(IDXGIAdapter1* pDXGIAdapter,
D3D_FEATURE_LEVEL FeatureLevels);
template <>
- bool CheckAdapterCompatibility<DeviceType::D3D11>(IDXGIAdapter1* pDXGIAdapter,
- D3D_FEATURE_LEVEL FeatureLevel)
+ bool CheckAdapterCompatibility<RENDER_DEVICE_TYPE_D3D11>(IDXGIAdapter1* pDXGIAdapter,
+ D3D_FEATURE_LEVEL FeatureLevel)
{
auto hr = D3D11CreateDevice(
nullptr,
@@ -218,8 +218,8 @@ private:
}
template <>
- bool CheckAdapterCompatibility<DeviceType::D3D12>(IDXGIAdapter1* pDXGIAdapter,
- D3D_FEATURE_LEVEL FeatureLevel)
+ bool CheckAdapterCompatibility<RENDER_DEVICE_TYPE_D3D12>(IDXGIAdapter1* pDXGIAdapter,
+ D3D_FEATURE_LEVEL FeatureLevel)
{
auto hr = D3D12CreateDevice(pDXGIAdapter, FeatureLevel, _uuidof(ID3D12Device), nullptr);
return SUCCEEDED(hr);