Forum > DirectX

Direct3D 10, 11 Create Device

(1/1)

cusean:
Hello. I just have to test Directx 10 and 11 Create Device and it crashes at CreateDeviceAndSwapChain with message 'Project raise exception class 'External: ?'. Tested in Lazarus 1.4.4 with fpc 2.6.4 and 3.0.0 rc2. Video Card supports.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---D3D11CreateDeviceAndSwapChain( nil, g_driverType, 0, createDeviceFlags, @featureLevels, Length(featureLevels), D3D11_SDK_VERSION, sd, g_pSwapChain, g_pd3dDevice, g_featureLevel, g_pImmediateContext ); headers https://github.com/CMCHTPC/DelphiDX12

ykot:
It's difficult to know what is the problem when you show only one line of code. Please show what "createDeviceFlags" and "featureLevels" have. Also, make sure to disable FPU exceptions.

Also, why not trying something that already implements all this and then just adapting it to your needs? PXL provides Direct3D 11 implementation, you can use it as a reference.

cusean:
Thank you. Solved with disabling fpu exceptions.

Navigation

[0] Message Index

Go to full version