summaryrefslogtreecommitdiffstats
path: root/Projects/Asteroids/src/asteroids_DE.cpp
diff options
context:
space:
mode:
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: