On Thursday, 3 October 2013 at 06:19:27 UTC, evilrat wrote:
i'm trying directx bindings from dsource (http://dsource.org/projects/bindings/wiki/DirectX) and encountered problem, when calling swap chain getbuffer it suddenly crashes. does anyone using it? any help please :(

// 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 );

well, after some research i can state that those bindings sucks. (is this actually bidings and not simply find & replace on C++ header?)

1) they declare C++ double ptr (i.e. void**) as plain D "out"!!!
2) this bindings handles C++ const &struct just declaring it as pointer!!!11!1 (or maybe i'm so noob?)
and finally,
3) i hate how author handled enums...(just personal opinion)

omg i need to fully rewrite this and add wrapper for C++ const ref before it would be even usable...

i'll post again when i do something. thanks for attention everyone.

Reply via email to