D3D11 Device |
Re: D3D11 Device |
DLudwig
|
D3D11 presents a lot less through its 'Device' interface than D3D9 did. It tends to break things up into a much larger set of interfaces. I.e. D3D9 had a pretty well defined focal point (in IDirect3DDevice9), with which all manner of things could be accomplished. D3D11 really doesn't have a similar, singular counterpart, and instead opts for lots of different objects, each with different interfaces. If you'd like to do D3D11 programming with SDL, which is possible, I'd recommend creating the D3D11 resources yourself. You can use SDL to create the OS-native window(s), and you can let SDL handle user input(s), audio, and the like. For rendering, I'd suggest that you: 1. use SDL_CreateWindow() to create a window 2. use SDL_GetWindowWMInfo() to get OS-specific info on the window. For Win32, this would be an HWND; for WinRT, this would be an ICoreWindow. 3. create your own DXGIFactory and D3D11 device (with Windows API functions like CreateDXGIFactory1() and D3D11CreateDevice()). 4. use one of several methods in IDXGIFactory2 to create the swap chain, passing-in data provided by SDL_GetWindowWMInfo() 5. create the rest of your GPU resources using the fore-mentioned D3D11 objects (the DXGIFactory, swap chain, and D3D11 device) Make sense? Cheers, -- David L. |
|||||||||||||
|