diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-02-03 18:20:05 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-02-03 18:20:05 +0000 |
| commit | d3748a48ea2718444e710a668664b0ad7b65a371 (patch) | |
| tree | 17af9593ad2e450ce372edbf8c0c3dd9e88e2ca1 /Projects/Asteroids/src/asteroids_DE.cpp | |
| parent | Added DG icon to MacOS bundles (diff) | |
| download | DiligentEngine-d3748a48ea2718444e710a668664b0ad7b65a371.tar.gz DiligentEngine-d3748a48ea2718444e710a668664b0ad7b65a371.zip | |
Updated Engine GL initialization
Diffstat (limited to 'Projects/Asteroids/src/asteroids_DE.cpp')
| -rw-r--r-- | Projects/Asteroids/src/asteroids_DE.cpp | 10 |
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: |
