This project has moved and is read-only. For the latest updates, please go here.

Why there is no implementation for function DXUTSetD3D11Device?

Feb 10, 2014 at 2:53 AM
Function DXUTSetD3D11Device declared in DXUT.h, but there is no implementation in DXUT.cpp, any reason?
Feb 11, 2014 at 6:57 PM
It is implemented by the GET_SET_ACCESSOR() macro in DXUT.cpp line 293
Jul 1, 2014 at 6:49 PM
Although you say it is implemented, I cannot used it, I get an error during linking process, I'm trying to use an existing device in DXUT,

Thanks in advance
Jul 1, 2014 at 6:55 PM
Can you provide a repro project? Ideally based something simple like EmptyProject?
Jul 18, 2014 at 7:50 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jul 18, 2014 at 11:28 PM
Edited Jul 18, 2014 at 11:29 PM
Ok, I was incorrect in my original assumption that it was implemented by the macro. DXUTSetD3D11Device was indeed not implemented. The prototype was in the first version of DXUT11 in 2008, copied from the DXUT10 version. Even the DXUT10 version implemented it in a weird way. It took a pSwapChain, but only used it to obtain description information and otherwise ignored it. In effect, DXUT10 only used the device.

Given that the primary purpose of DXUT is to provide a way to create devices/swapchains and do all the re-creation and enumeration needed for lots of scenarios, there's not much value in having such a way to initialize the framework. If you already have a device and swapchain, you probably shouldn't be using the DXUT framework anyhow and instead use utilities like DirectX Tool Kit.

Therefore, I believe the correct resolution is to remove prototype from the header and remove references to it from the comments.
Marked as answer by walbourn on 7/18/2014 at 3:28 PM