summaryrefslogtreecommitdiffstats
path: root/Projects/Asteroids/src/asteroids_DE.cpp
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 /Projects/Asteroids/src/asteroids_DE.cpp
parentEnabled IOS build (diff)
parentUpdated core submodule (diff)
downloadDiligentEngine-e7a82e9786c96f4d36cd8cf7d4708e3565aac2c6.tar.gz
DiligentEngine-e7a82e9786c96f4d36cd8cf7d4708e3565aac2c6.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'Projects/Asteroids/src/asteroids_DE.cpp')
-rw-r--r--Projects/Asteroids/src/asteroids_DE.cpp10
1 files changed, 6 insertions, 4 deletions
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: