summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorDiligentGraphics <admin@diligentgraphics.com>2018-03-06 16:26:31 +0000
committerGitHub <noreply@github.com>2018-03-06 16:26:31 +0000
commiteb70ace06c186b0c0aa9783ccec7d50f798f8de9 (patch)
tree3f82e19a30270de9a6a5978c70082874b4219c74 /Graphics/GraphicsEngineOpenGL
parentUpdate README.md (diff)
downloadDiligentCore-eb70ace06c186b0c0aa9783ccec7d50f798f8de9.tar.gz
DiligentCore-eb70ace06c186b0c0aa9783ccec7d50f798f8de9.zip
Update readme.md
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/readme.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/readme.md b/Graphics/GraphicsEngineOpenGL/readme.md
index ce4181ca..74055536 100644
--- a/Graphics/GraphicsEngineOpenGL/readme.md
+++ b/Graphics/GraphicsEngineOpenGL/readme.md
@@ -20,10 +20,13 @@ using namespace Diligent;
#endif
RefCntAutoPtr<IRenderDevice> pRenderDevice;
RefCntAutoPtr<IDeviceContext> pImmediateContext;
-SwapChainDesc SwapChainDesc;
+SwapChainDesc SCDesc;
RefCntAutoPtr<ISwapChain> pSwapChain;
-GetEngineFactoryOpenGL()->CreateDeviceAndSwapChainGL(
- EngineCreationAttribs(), &pRenderDevice, &pImmediateContext, SwapChainDesc, hWnd, &pSwapChain );
+auto *pFactoryOpenGL = GetEngineFactoryOpenGL();
+EngineGLAttribs CreationAttribs;
+CreationAttribs.pNativeWndHandle = NativeWindowHandle;
+pFactoryOpenGL->CreateDeviceAndSwapChainGL(
+ CreationAttribs, &pRenderDevice, &pImmediateContext, SCDesc, &pSwapChain);
```
Alternatively, the engine can be initialized by attaching to existing OpenGL context (see [below](#initializing-the-engine-by-attaching-to-existing-gl-context)).
@@ -109,4 +112,4 @@ Initial release
**Copyright 2015-2018 Egor Yusov**
-[diligentgraphics.com](http://diligentgraphics.com) \ No newline at end of file
+[diligentgraphics.com](http://diligentgraphics.com)