summaryrefslogtreecommitdiffstats
path: root/Tests/TestApp/src
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-04-06 16:29:50 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-04-06 16:29:50 +0000
commitea0c5eacdd91a1c17502eb2ba36093ac054572ce (patch)
tree827f3dc2613ecd5138126fd7cd22d850c42c7c9d /Tests/TestApp/src
parentRefactored overloaded IPipelineState::GetStaticShaderVariable and IShaderReso... (diff)
downloadDiligentEngine-ea0c5eacdd91a1c17502eb2ba36093ac054572ce.tar.gz
DiligentEngine-ea0c5eacdd91a1c17502eb2ba36093ac054572ce.zip
Updated API version to 240021
Diffstat (limited to 'Tests/TestApp/src')
-rw-r--r--Tests/TestApp/src/ShaderConverterTest.cpp6
-rw-r--r--Tests/TestApp/src/TestBufferAccess.cpp6
-rw-r--r--Tests/TestApp/src/TestDrawCommands.cpp8
-rw-r--r--Tests/TestApp/src/TestGeometryShader.cpp6
-rw-r--r--Tests/TestApp/src/TestShaderResArrays.cpp6
-rw-r--r--Tests/TestApp/src/TestShaderResourceLayout.cpp6
-rw-r--r--Tests/TestApp/src/TestShaderVarAccess.cpp6
-rw-r--r--Tests/TestApp/src/TestTessellation.cpp6
-rw-r--r--Tests/TestApp/src/TestTexturing.cpp6
9 files changed, 28 insertions, 28 deletions
diff --git a/Tests/TestApp/src/ShaderConverterTest.cpp b/Tests/TestApp/src/ShaderConverterTest.cpp
index e0049a7..8995e28 100644
--- a/Tests/TestApp/src/ShaderConverterTest.cpp
+++ b/Tests/TestApp/src/ShaderConverterTest.cpp
@@ -30,7 +30,6 @@
#include "Errors.h"
#include "ScriptParser.h"
#include "ConvenienceFunctions.h"
-#include "BasicShaderSourceStreamFactory.h"
#include "HLSL2GLSLConverter.h"
using namespace Diligent;
@@ -40,8 +39,9 @@ ShaderConverterTest::ShaderConverterTest( IRenderDevice *pRenderDevice, IDeviceC
{
ShaderCreateInfo ShaderCI;
ShaderCI.FilePath = "Shaders\\ConverterTest.fx";
- BasicShaderSourceStreamFactory BasicSSSFactory("Shaders");
- ShaderCI.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pRenderDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory("Shaders", &pShaderSourceFactory);
+ ShaderCI.pShaderSourceStreamFactory = pShaderSourceFactory;
ShaderCI.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL;
ShaderCI.Desc.Name = "Test converted shader";
ShaderCI.UseCombinedTextureSamplers = pRenderDevice->GetDeviceCaps().IsGLDevice();
diff --git a/Tests/TestApp/src/TestBufferAccess.cpp b/Tests/TestApp/src/TestBufferAccess.cpp
index db8dc7b..6c31c2f 100644
--- a/Tests/TestApp/src/TestBufferAccess.cpp
+++ b/Tests/TestApp/src/TestBufferAccess.cpp
@@ -28,7 +28,6 @@
#include <math.h>
#include "TestBufferAccess.h"
#include "MapHelper.h"
-#include "BasicShaderSourceStreamFactory.h"
using namespace Diligent;
@@ -113,8 +112,9 @@ void TestBufferAccess::Init( IRenderDevice *pDevice, IDeviceContext *pContext, I
}
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory;
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory(nullptr, &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.Desc.TargetProfile = bUseGLSL ? SHADER_PROFILE_GL_4_2 : SHADER_PROFILE_DX_5_0;
CreationAttrs.UseCombinedTextureSamplers = true;
diff --git a/Tests/TestApp/src/TestDrawCommands.cpp b/Tests/TestApp/src/TestDrawCommands.cpp
index 662c24a..809ad73 100644
--- a/Tests/TestApp/src/TestDrawCommands.cpp
+++ b/Tests/TestApp/src/TestDrawCommands.cpp
@@ -27,11 +27,10 @@
#include "pch.h"
#include "TestDrawCommands.h"
#include "MapHelper.h"
-#include "BasicShaderSourceStreamFactory.h"
using namespace Diligent;
-void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext, ISwapChain *pSwapChain, float fMinXCoord, float fMinYCoord, float fXExtent, float fYExtent )
+void TestDrawCommands::Init(IRenderDevice *pDevice, IDeviceContext *pDeviceContext, ISwapChain *pSwapChain, float fMinXCoord, float fMinYCoord, float fXExtent, float fYExtent )
{
m_pRenderDevice = pDevice;
m_pDeviceContext = pDeviceContext;
@@ -157,8 +156,9 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory;
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory(nullptr, &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.Desc.TargetProfile = bUseGLSL ? SHADER_PROFILE_GL_4_2 : SHADER_PROFILE_DX_5_0;
CreationAttrs.UseCombinedTextureSamplers = true;
diff --git a/Tests/TestApp/src/TestGeometryShader.cpp b/Tests/TestApp/src/TestGeometryShader.cpp
index bc4ab5a..7977838 100644
--- a/Tests/TestApp/src/TestGeometryShader.cpp
+++ b/Tests/TestApp/src/TestGeometryShader.cpp
@@ -27,7 +27,6 @@
#include "pch.h"
#include "TestGeometryShader.h"
#include "MapHelper.h"
-#include "BasicShaderSourceStreamFactory.h"
using namespace Diligent;
@@ -42,8 +41,9 @@ void TestGeometryShader::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCo
m_pDeviceContext = pDeviceContext;
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory;
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory(nullptr, &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL;
CreationAttrs.UseCombinedTextureSamplers = true;
diff --git a/Tests/TestApp/src/TestShaderResArrays.cpp b/Tests/TestApp/src/TestShaderResArrays.cpp
index 28c5c70..21ff0ac 100644
--- a/Tests/TestApp/src/TestShaderResArrays.cpp
+++ b/Tests/TestApp/src/TestShaderResArrays.cpp
@@ -27,7 +27,6 @@
#include "pch.h"
#include "TestShaderResArrays.h"
#include "GraphicsUtilities.h"
-#include "BasicShaderSourceStreamFactory.h"
#include "TestTexturing.h"
using namespace Diligent;
@@ -39,8 +38,9 @@ TestShaderResArrays::TestShaderResArrays(IRenderDevice *pDevice, IDeviceContext
m_pDeviceContext = pDeviceContext;
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory;
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory(nullptr, &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.Desc.TargetProfile = SHADER_PROFILE_DX_5_0;
CreationAttrs.UseCombinedTextureSamplers = true;
diff --git a/Tests/TestApp/src/TestShaderResourceLayout.cpp b/Tests/TestApp/src/TestShaderResourceLayout.cpp
index 63b8ddc..3d2cd94 100644
--- a/Tests/TestApp/src/TestShaderResourceLayout.cpp
+++ b/Tests/TestApp/src/TestShaderResourceLayout.cpp
@@ -26,7 +26,6 @@
#include "pch.h"
#include "TestShaderResourceLayout.h"
-#include "BasicShaderSourceStreamFactory.h"
using namespace Diligent;
@@ -43,8 +42,9 @@ TestShaderResourceLayout::TestShaderResourceLayout( IRenderDevice *pDevice, IDev
}
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory("Shaders");
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory("Shaders", &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.EntryPoint = "main";
CreationAttrs.UseCombinedTextureSamplers = false;
diff --git a/Tests/TestApp/src/TestShaderVarAccess.cpp b/Tests/TestApp/src/TestShaderVarAccess.cpp
index 4dd46b3..98714da 100644
--- a/Tests/TestApp/src/TestShaderVarAccess.cpp
+++ b/Tests/TestApp/src/TestShaderVarAccess.cpp
@@ -26,7 +26,6 @@
#include "pch.h"
#include "TestShaderVarAccess.h"
-#include "BasicShaderSourceStreamFactory.h"
#include "GraphicsAccessories.h"
#include "../../../DiligentCore/Graphics/GraphicsEngineD3DBase/interface/ShaderD3D.h"
@@ -64,8 +63,9 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext
return;
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory("Shaders");
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory("Shaders", &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.EntryPoint = "main";
CreationAttrs.UseCombinedTextureSamplers = true;
diff --git a/Tests/TestApp/src/TestTessellation.cpp b/Tests/TestApp/src/TestTessellation.cpp
index e099998..388f837 100644
--- a/Tests/TestApp/src/TestTessellation.cpp
+++ b/Tests/TestApp/src/TestTessellation.cpp
@@ -27,7 +27,6 @@
#include "pch.h"
#include "TestTessellation.h"
#include "MapHelper.h"
-#include "BasicShaderSourceStreamFactory.h"
using namespace Diligent;
@@ -42,8 +41,9 @@ void TestTessellation::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont
m_pDeviceContext = pDeviceContext;
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory;
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory("Shaders", &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL;
CreationAttrs.UseCombinedTextureSamplers = true;
diff --git a/Tests/TestApp/src/TestTexturing.cpp b/Tests/TestApp/src/TestTexturing.cpp
index 2b5f5a2..fa2a589 100644
--- a/Tests/TestApp/src/TestTexturing.cpp
+++ b/Tests/TestApp/src/TestTexturing.cpp
@@ -28,7 +28,6 @@
#include <math.h>
#include "TestTexturing.h"
#include "GraphicsUtilities.h"
-#include "BasicShaderSourceStreamFactory.h"
#include "ShaderMacroHelper.h"
using namespace Diligent;
@@ -168,8 +167,9 @@ void TestTexturing::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext
auto PixelFormatAttribs = m_pRenderDevice->GetTextureFormatInfoExt(m_TextureFormat);
ShaderCreateInfo CreationAttrs;
- BasicShaderSourceStreamFactory BasicSSSFactory;
- CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory;
+ RefCntAutoPtr<IShaderSourceInputStreamFactory> pShaderSourceFactory;
+ pDevice->GetEngineFactory()->CreateDefaultShaderSourceStreamFactory("Shaders", &pShaderSourceFactory);
+ CreationAttrs.pShaderSourceStreamFactory = pShaderSourceFactory;
CreationAttrs.Desc.TargetProfile = bUseGLSL ? SHADER_PROFILE_GL_4_2 : SHADER_PROFILE_DX_5_0;
CreationAttrs.UseCombinedTextureSamplers = true;