From eb70ace06c186b0c0aa9783ccec7d50f798f8de9 Mon Sep 17 00:00:00 2001 From: DiligentGraphics Date: Tue, 6 Mar 2018 08:26:31 -0800 Subject: Update readme.md --- Graphics/GraphicsEngineOpenGL/readme.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') 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 pRenderDevice; RefCntAutoPtr pImmediateContext; -SwapChainDesc SwapChainDesc; +SwapChainDesc SCDesc; RefCntAutoPtr 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) -- cgit v1.2.3