directx bindings problem
evilrat
evilrat666 at gmail.com
Thu Oct 3 04:57:57 PDT 2013
On Thursday, 3 October 2013 at 11:30:58 UTC, Andrej Mitrovic
wrote:
> On 10/3/13, evilrat <evilrat666 at 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.
More information about the Digitalmars-d-learn
mailing list