summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-02-03 20:55:17 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-02-03 20:55:17 +0000
commite7a82e9786c96f4d36cd8cf7d4708e3565aac2c6 (patch)
tree105b653fce5c6a4d96bd8800b206aa172a7dd771
parentEnabled IOS build (diff)
parentUpdated core submodule (diff)
downloadDiligentEngine-e7a82e9786c96f4d36cd8cf7d4708e3565aac2c6.tar.gz
DiligentEngine-e7a82e9786c96f4d36cd8cf7d4708e3565aac2c6.zip
Merge remote-tracking branch 'origin/master'
m---------DiligentCore0
m---------DiligentSamples0
m---------DiligentTools0
-rw-r--r--Projects/Asteroids/src/asteroids_DE.cpp10
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp2
-rw-r--r--unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp13
6 files changed, 17 insertions, 8 deletions
diff --git a/DiligentCore b/DiligentCore
-Subproject ac71537172ba593b2525bbe85e0116c6703ed6e
+Subproject 06a339f9f08827001eb77c6b0216c0fb8237d78
diff --git a/DiligentSamples b/DiligentSamples
-Subproject a3319de427b1f2c83634bc6e0e1f65aa0b16b86
+Subproject 3033f82f8af05924c44e2381c036b4eac9eb800
diff --git a/DiligentTools b/DiligentTools
-Subproject 541d563ee11d4ffe8b0a8e93d534256a28f83a1
+Subproject 1875b565d5e305a8991cd2ea4e92d654f2b1b70
diff --git a/Projects/Asteroids/src/asteroids_DE.cpp b/Projects/Asteroids/src/asteroids_DE.cpp
index 7593f36..d620d29 100644
--- a/Projects/Asteroids/src/asteroids_DE.cpp
+++ b/Projects/Asteroids/src/asteroids_DE.cpp
@@ -51,8 +51,6 @@ namespace AsteroidsDE {
// Create Direct3D device and swap chain
void Asteroids::InitDevice(HWND hWnd, DeviceType DevType)
{
- EngineCreationAttribs EngineCreationAttribs;
- EngineCreationAttribs.strShaderCachePath = "bin\\tmp\\ShaderCache";
SwapChainDesc SwapChainDesc;
SwapChainDesc.SamplesCount = 1;
SwapChainDesc.BufferCount = NUM_SWAP_CHAIN_BUFFERS;
@@ -104,14 +102,18 @@ void Asteroids::InitDevice(HWND hWnd, DeviceType DevType)
break;
case DeviceType::OpenGL:
+ {
#ifdef ENGINE_DLL
- if(GetEngineFactoryOpenGL == nullptr)
+ if (GetEngineFactoryOpenGL == nullptr)
{
LoadGraphicsEngineOpenGL(GetEngineFactoryOpenGL);
}
#endif
+ EngineGLAttribs CreationAttribs;
+ CreationAttribs.pNativeWndHandle = hWnd;
GetEngineFactoryOpenGL()->CreateDeviceAndSwapChainGL(
- EngineCreationAttribs, &mDevice, &mDeviceCtxt, SwapChainDesc, hWnd, &mSwapChain );
+ CreationAttribs, &mDevice, &mDeviceCtxt, SwapChainDesc, &mSwapChain);
+ }
break;
default:
diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp
index 2a07cc2..b5e1a0c 100644
--- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp
+++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp
@@ -49,7 +49,7 @@ void RenderAPI_OpenGLCoreES::ProcessDeviceEvent(UnityGfxDeviceEventType type, IU
if (type == kUnityGfxDeviceEventInitialize)
{
auto *pFactoryGL = GetEngineFactoryOpenGL();
- EngineCreationAttribs Attribs;
+ EngineGLAttribs 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 b9ab052..9a8a164 100644
--- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp
+++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp
@@ -6,17 +6,19 @@
#include "RenderDeviceFactoryOpenGL.h"
#include "SwapChainBase.h"
#include "DefaultRawMemoryAllocator.h"
+
#include "UnityGraphicsGL_Impl.h"
+#include "SwapChainGL.h"
using namespace Diligent;
namespace
{
-class ProxySwapChainGL : public SwapChainBase<ISwapChain>
+class ProxySwapChainGL : public SwapChainBase<ISwapChainGL>
{
public:
- using TBase = SwapChainBase<ISwapChain>;
+ using TBase = SwapChainBase<ISwapChainGL>;
ProxySwapChainGL( IReferenceCounters *pRefCounters,
IRenderDevice *pDevice,
@@ -34,6 +36,11 @@ public:
{
TBase::Resize(NewWidth, NewHeight, 0);
}
+
+ virtual GLuint GetDefaultFBO()const override final
+ {
+ return 0;
+ }
};
}
@@ -44,7 +51,7 @@ DiligentGraphicsAdapterGL::DiligentGraphicsAdapterGL(const UnityGraphicsGLCoreES
auto *UnityGraphicsGLImpl = UnityGraphicsGL.GetGraphicsImpl();
auto *pFactoryGL = GetEngineFactoryOpenGL();
- EngineCreationAttribs Attribs;
+ EngineGLAttribs Attribs;
pFactoryGL->AttachToActiveGLContext(Attribs, &m_pDevice, &m_pDeviceCtx);
auto BackBufferGLFormat = UnityGraphicsGLImpl->GetBackBufferFormat();