Recent

Author Topic: Direct3D 10, 11 Create Device  (Read 10993 times)

cusean

  • Newbie
  • Posts: 2
Direct3D 10, 11 Create Device
« 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
« Last Edit: November 10, 2015, 07:22:11 pm by cusean »

ykot

  • Full Member
  • ***
  • Posts: 141
Re: Direct3D 10/11 Create Device
« Reply #1 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 provides Direct3D 11 implementation, you can use it as a reference.

cusean

  • Newbie
  • Posts: 2
Re: Direct3D 10/11 Create Device
« Reply #2 on: November 10, 2015, 06:41:55 pm »
Thank you. Solved with disabling fpu exceptions.

 

TinyPortal © 2005-2018