Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dMDI

Exception caused by DirectX in Delphi

This topic is 5856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I downloaded the Jedi 8.1 headers from their site and started making a program in Delphi. However, when I call my DrawDirectX function, an exception is caught by the debugger in exception class C0000005 at read off address 0xffffff. My drawing code is this: procedure DrawDirectX; begin Device.Clear(0, nil, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0, 0); Device.BeginScene; Device.EndScene; end; And my DirectX initialisation code is this: procedure InitialiseDirectX; var PP : TD3DPresent_Parameters; DM : TD3DDisplayMode; DT : TD3DDevTYpe; begin D3D := Direct3DCreate8(D3D_SDK_VERSION); if D3D = nil then Exit; FillChar(PP, sizeof(PP), 0); if Failed(D3D.GetAdapterDisplayMode(D3DADAPTER_DEFAULT, DM)) then Exit; PP.SwapEffect := D3DSWAPEFFECT_DISCARD; PP.BackBufferFormat := DM.Format; DT := D3DDEVTYPE_HAL; if Failed(D3D.CreateDevice(D3DADAPTER_DEFAULT, DT, Handle, D3DCREATE_SOFTWARE_VERTEXPROCESSING, PP, Device)) then Exit; end; Does anyone know what could be causing this? It is really annoying me, as I cannot draw anything to the screen! TIA. dMDI "I don''''t know with what weapons the third world war will be fought, but I know the fourth will be fought with sticks and stones." Einstein

Share this post


Link to post
Share on other sites
Advertisement
NM, I found it.

dMDI

"I don''''t know with what weapons the third world war will be fought, but I know the fourth will be fought with sticks and stones." Einstein

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!