Lazarus

Programming => Graphics and Multimedia => DirectX => Topic started by: cusean on November 10, 2015, 04:15:06 pm

Title: Direct3D 10, 11 Create Device
Post by: cusean on November 10, 2015, 04:15:06 pm
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  [Select][+][-]
  1. D3D11CreateDeviceAndSwapChain( nil, g_driverType, 0, createDeviceFlags, @featureLevels, Length(featureLevels), D3D11_SDK_VERSION, sd, g_pSwapChain, g_pd3dDevice, g_featureLevel, g_pImmediateContext );
  2.  
headers https://github.com/CMCHTPC/DelphiDX12 (https://github.com/CMCHTPC/DelphiDX12)
Title: Re: Direct3D 10/11 Create Device
Post by: ykot on November 10, 2015, 05:14:44 pm
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 (http://www.afterwarp.net/products/pxl) provides Direct3D 11 implementation, you can use it as a reference.
Title: Re: Direct3D 10/11 Create Device
Post by: cusean on November 10, 2015, 06:41:55 pm
Thank you. Solved with disabling fpu exceptions.
TinyPortal © 2005-2018