Any windows cracks in here?
Basically, I want a pointer to (a shared region of) the framebuffer without
using DirectX (D3D10) by only using DXGI. I can do it with DirectX. For, upon
creating a D3D10 device virtually everything can be queried. D3D10 uses DXGI
underneath. For example, upon creating a texture (CreateTexture2D) the runtime
creates an IDXGISurface which can be queried and from which a pointer to the
texture data can be obtained. Or one can build a render target and query for
the IDXGISurface. Anyhow, I want to create my own surface for rendering. But
this requires an IDXGIDevice object (sort of a rendering device) and using the
method IDXGIDevice::CreateSurface. But for the life of me I can't get a
pointer to IDXGIDevice. There seems to be no function for creating such a
device. Using Direct3D the device can be obtained like this
IDXGIDevice *pDXGIDevice;
pD3DDevice->QueryInterface(__uuidof(IDXGIDevice), (void **) &pDXGIDevice);
from which one can also query the IDXGIAdapter and IDXGIFactory to create, for
example, a Swap Chain.
I have (without using D3D10) created an IDXGIFactory and got the IDXGIAdapter
(graphics card) and the IDXGIOutput (monitor). But an IDXGIDevice can't be
queried from them (E_NOINTERFACE). Well, how to create, build, or query an
IDXGIDevice without using DirectX? It should be possible;
I don't need a IDXGIDevice for rendering DirectX commands or GDI etc. What's
needed is just a bitmap (given a specific format, i.e DXGI_SURFACE_DESC) in
VRAM (tied to my window) to allow me to draw pixels in there.