From d31dc00f82d2121dc0378db77264d9263540a192 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 25 Jan 2020 11:19:23 -0800 Subject: Reworked main headers to be compatible with c --- .../include/D3DTypeConversionImpl.h | 6 +++--- .../GraphicsEngineD3DBase/include/EngineFactoryD3DBase.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'Graphics/GraphicsEngineD3DBase') 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 +template class EngineFactoryD3DBase : public EngineFactoryBase { 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(SrcMode.Scaling); - DstMode.ScanlineOrder = static_cast(SrcMode.ScanlineOrdering); + DstMode.Scaling = static_cast(SrcMode.Scaling); + DstMode.ScanlineOrder = static_cast(SrcMode.ScanlineOrdering); } NumDisplayModes = std::min(NumDisplayModes, numModes); } @@ -194,13 +194,13 @@ protected: } private: - template + template bool CheckAdapterCompatibility(IDXGIAdapter1* pDXGIAdapter, D3D_FEATURE_LEVEL FeatureLevels); template <> - bool CheckAdapterCompatibility(IDXGIAdapter1* pDXGIAdapter, - D3D_FEATURE_LEVEL FeatureLevel) + bool CheckAdapterCompatibility(IDXGIAdapter1* pDXGIAdapter, + D3D_FEATURE_LEVEL FeatureLevel) { auto hr = D3D11CreateDevice( nullptr, @@ -218,8 +218,8 @@ private: } template <> - bool CheckAdapterCompatibility(IDXGIAdapter1* pDXGIAdapter, - D3D_FEATURE_LEVEL FeatureLevel) + bool CheckAdapterCompatibility(IDXGIAdapter1* pDXGIAdapter, + D3D_FEATURE_LEVEL FeatureLevel) { auto hr = D3D12CreateDevice(pDXGIAdapter, FeatureLevel, _uuidof(ID3D12Device), nullptr); return SUCCEEDED(hr); -- cgit v1.2.3