diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-03-06 08:02:14 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-03-06 08:02:14 +0000 |
| commit | 1932df174dbec55f7a4fa31b0660cdc8ceb7657c (patch) | |
| tree | 5ccad5d1f1fec861b79aaaa41837ee00e687abdc /Tests/TestApp/src | |
| parent | Updates to comply with addition of ShaderFlags to IPipelineState::BindStaticR... (diff) | |
| download | DiligentEngine-1932df174dbec55f7a4fa31b0660cdc8ceb7657c.tar.gz DiligentEngine-1932df174dbec55f7a4fa31b0660cdc8ceb7657c.zip | |
Final updates to make GL backend work
Diffstat (limited to 'Tests/TestApp/src')
| -rw-r--r-- | Tests/TestApp/src/ShaderConverterTest.cpp | 34 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestApp.cpp | 4 |
2 files changed, 19 insertions, 19 deletions
diff --git a/Tests/TestApp/src/ShaderConverterTest.cpp b/Tests/TestApp/src/ShaderConverterTest.cpp index b69f7fb..e0049a7 100644 --- a/Tests/TestApp/src/ShaderConverterTest.cpp +++ b/Tests/TestApp/src/ShaderConverterTest.cpp @@ -38,29 +38,29 @@ using namespace Diligent; ShaderConverterTest::ShaderConverterTest( IRenderDevice *pRenderDevice, IDeviceContext *pContext ) : UnitTestBase("Shader Converter Test") { - ShaderCreationAttribs CreationAttrs; - CreationAttrs.FilePath = "Shaders\\ConverterTest.fx"; + ShaderCreateInfo ShaderCI; + ShaderCI.FilePath = "Shaders\\ConverterTest.fx"; BasicShaderSourceStreamFactory BasicSSSFactory("Shaders"); - CreationAttrs.pShaderSourceStreamFactory = &BasicSSSFactory; - CreationAttrs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; - CreationAttrs.Desc.Name = "Test converted shader"; - CreationAttrs.UseCombinedTextureSamplers = pRenderDevice->GetDeviceCaps().IsGLDevice(); + ShaderCI.pShaderSourceStreamFactory = &BasicSSSFactory; + ShaderCI.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; + ShaderCI.Desc.Name = "Test converted shader"; + ShaderCI.UseCombinedTextureSamplers = pRenderDevice->GetDeviceCaps().IsGLDevice(); RefCntAutoPtr<IHLSL2GLSLConversionStream> pStream; - CreationAttrs.ppConversionStream = pStream.GetRawDblPtr(); + ShaderCI.ppConversionStream = pStream.GetRawDblPtr(); { - CreationAttrs.Desc.ShaderType = SHADER_TYPE_PIXEL; - CreationAttrs.EntryPoint = "TestPS"; + ShaderCI.Desc.ShaderType = SHADER_TYPE_PIXEL; + ShaderCI.EntryPoint = "TestPS"; RefCntAutoPtr<IShader> pShader; - pRenderDevice->CreateShader( CreationAttrs, &pShader ); + pRenderDevice->CreateShader( ShaderCI, &pShader ); VERIFY_EXPR( pShader ); } { - CreationAttrs.EntryPoint = "TestVS"; - CreationAttrs.Desc.ShaderType = SHADER_TYPE_VERTEX; + ShaderCI.EntryPoint = "TestVS"; + ShaderCI.Desc.ShaderType = SHADER_TYPE_VERTEX; RefCntAutoPtr<IShader> pShader; - pRenderDevice->CreateShader( CreationAttrs, &pShader ); + pRenderDevice->CreateShader( ShaderCI, &pShader ); VERIFY_EXPR( pShader ); } @@ -68,11 +68,11 @@ ShaderConverterTest::ShaderConverterTest( IRenderDevice *pRenderDevice, IDeviceC if(pRenderDevice->GetDeviceCaps().bComputeShadersSupported) { #if PLATFORM_LINUX - CreationAttrs.FilePath = "Shaders\\CSConversionTest.fx"; - CreationAttrs.EntryPoint = "TestCS"; - CreationAttrs.Desc.ShaderType = SHADER_TYPE_COMPUTE; + ShaderCI.FilePath = "Shaders\\CSConversionTest.fx"; + ShaderCI.EntryPoint = "TestCS"; + ShaderCI.Desc.ShaderType = SHADER_TYPE_COMPUTE; RefCntAutoPtr<IShader> pShader; - pRenderDevice->CreateShader( CreationAttrs, &pShader ); + pRenderDevice->CreateShader( ShaderCI, &pShader ); VERIFY_EXPR( pShader ); #elif PLATFORM_WIN32 status = "Skipped compute shader conversion test as on Win32, only 8 image uniforms are allowed. Besides, an error is generated when passing image as a function argument."; diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index b859ac4..dcfca89 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -249,8 +249,8 @@ void TestApp::InitializeDiligentEngine( // Load the dll and import GetEngineFactoryOpenGL() function LoadGraphicsEngineOpenGL(GetEngineFactoryOpenGL); #endif - auto *pFactoryOpenGL = GetEngineFactoryOpenGL(); - EngineGLAttribs CreationAttribs; + auto* pFactoryOpenGL = GetEngineFactoryOpenGL(); + EngineGLCreateInfo CreationAttribs; CreationAttribs.pNativeWndHandle = NativeWindowHandle; #if PLATFORM_LINUX CreationAttribs.pDisplay = display; |
