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 | |
| 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
| m--------- | DiligentCore | 0 | ||||
| m--------- | DiligentSamples | 0 | ||||
| m--------- | DiligentTools | 0 | ||||
| -rw-r--r-- | Projects/Asteroids/src/asteroids_DE.cpp | 2 | ||||
| -rw-r--r-- | Tests/TestApp/src/ShaderConverterTest.cpp | 34 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestApp.cpp | 4 | ||||
| -rw-r--r-- | unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp | 4 | ||||
| -rw-r--r-- | unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp | 4 |
8 files changed, 24 insertions, 24 deletions
diff --git a/DiligentCore b/DiligentCore -Subproject bdbca67b0e03baec3b9dd803e803d267210e892 +Subproject c87e69d08937a012ed00d9c5395b942a8f6de9b diff --git a/DiligentSamples b/DiligentSamples -Subproject 6a58ebeb40987b6b6658906569f497458106300 +Subproject e0361c03aa143b5d160b6669c1cfd86f9373417 diff --git a/DiligentTools b/DiligentTools -Subproject 3143f62446c373f600583de07ba0e2e33364149 +Subproject 5b2da8d2da0a71465a5bcbc9ed4780eb8568c89 diff --git a/Projects/Asteroids/src/asteroids_DE.cpp b/Projects/Asteroids/src/asteroids_DE.cpp index 52be188..5962108 100644 --- a/Projects/Asteroids/src/asteroids_DE.cpp +++ b/Projects/Asteroids/src/asteroids_DE.cpp @@ -156,7 +156,7 @@ void Asteroids::InitDevice(HWND hWnd, DeviceType DevType) LoadGraphicsEngineOpenGL(GetEngineFactoryOpenGL); } #endif - EngineGLAttribs CreationAttribs; + EngineGLCreateInfo CreationAttribs; CreationAttribs.pNativeWndHandle = hWnd; GetEngineFactoryOpenGL()->CreateDeviceAndSwapChainGL( CreationAttribs, &mDevice, &mDeviceCtxt, SwapChainDesc, &mSwapChain); 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; diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp index 3d4899c..d56979e 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp @@ -6,7 +6,7 @@ #if SUPPORT_OPENGL_UNIFIED #include "RenderAPI.h" -#include "RenderDeviceFactoryOpenGL.h" +#include "EngineFactoryOpenGL.h" #include "DeviceContextGL.h" #include "RenderDeviceGL.h" @@ -49,7 +49,7 @@ void RenderAPI_OpenGLCoreES::ProcessDeviceEvent(UnityGfxDeviceEventType type, IU if (type == kUnityGfxDeviceEventInitialize) { auto *pFactoryGL = GetEngineFactoryOpenGL(); - EngineGLAttribs Attribs; + EngineGLCreateInfo Attribs; pFactoryGL->AttachToActiveGLContext(Attribs, &m_Device, &m_Context); if (m_Context) { diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp index 58cb89d..43cd75e 100644 --- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp +++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp @@ -3,7 +3,7 @@ #if GL_SUPPORTED || GLES_SUPPORTED #include "UnityGraphicsGLCoreES_Emulator.h" -#include "RenderDeviceFactoryOpenGL.h" +#include "EngineFactoryOpenGL.h" #include "SwapChainBase.h" #include "DefaultRawMemoryAllocator.h" @@ -69,7 +69,7 @@ DiligentGraphicsAdapterGL::DiligentGraphicsAdapterGL(const UnityGraphicsGLCoreES auto *UnityGraphicsGLImpl = UnityGraphicsGL.GetGraphicsImpl(); auto *pFactoryGL = GetEngineFactoryOpenGL(); - EngineGLAttribs Attribs; + EngineGLCreateInfo Attribs; pFactoryGL->AttachToActiveGLContext(Attribs, &m_pDevice, &m_pDeviceCtx); auto BackBufferGLFormat = UnityGraphicsGLImpl->GetBackBufferFormat(); |
