On Thursday, 3 October 2013 at 11:30:58 UTC, Andrej Mitrovic
wrote:
On 10/3/13, evilrat <evilrat...@gmail.com> wrote:
// Create a render target view
ID3D11Texture2D* pBackBuffer;
// C++ version
//hr = g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D
),(LPVOID*)&pBackBuffer );
// D version(crashes)
hr = g_pSwapChain.GetBuffer( 0, &IID_ID3D11Texture2D,
cast(LPVOID*)pBackBuffer );
You're passing a null pointer (pBackBuffer). You should try
this:
ID3D11Texture2D backBuffer;
hr = g_pSwapChain.GetBuffer( 0, &IID_ID3D11Texture2D,
cast(LPVOID*)&backBuffer );
this not works too(actually it would never be, because this is
just interface).
what i'm trying to do is what works on c++ just fine, so that
texture should be null.
actually now i'm think this bindings too outdated, or there is
some ABI mismatch which i can't find out now... either way, i
think creating a custom binding would be the best way.
thanks for help anyway.