From 1932df174dbec55f7a4fa31b0660cdc8ceb7657c Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 6 Mar 2019 00:02:14 -0800 Subject: Final updates to make GL backend work --- Tests/TestApp/src/ShaderConverterTest.cpp | 34 +++++++++++++++---------------- Tests/TestApp/src/TestApp.cpp | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'Tests/TestApp/src') 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 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 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 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 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; -- cgit v1.2.3