Sign in to follow this  

Direct3D8 create error

This topic is 4354 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 init the Direct3D8 like this: FillChar (D3DInit, SizeOf(D3DInit), 0); WITH D3DInit DO BEGIN Windowed:= TRUE; BackBufferWidth:= 320; BackBufferHeight:= 200; BackBufferCount:= 1; BackBufferFormat:= VideoCardInfo.Format; // this was queried SwapEffect:= D3DSWAPEFFECT_DISCARD; hDeviceWindow:= InitedRec.hWindow; END; Res:= Direct3D.CreateDevice (D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, MyWindow, D3DCREATE_HARDWARE_VERTEXPROCESSING, D3DInit, Device); Delphi code. It works in every card I tested, except in a "S3 inc. Savage4" card. But the test with DXDIAG is good, fast enough. It said, there is no HW acceleration for D3D. It drop D3DERR_INVALIDCALL.

Share this post


Link to post
Share on other sites
This is my best guess: since you explicitly for a hardware device capable of vertex processing and the specified card does not conform to that, the device is not created. You should use device enumeration instead to determine the best option for rendering on a particular system.

Illco

Share this post


Link to post
Share on other sites
Okay, but the 3D test (cube rotating) with DXDIAG promised me that the speed is too good for HW usage. Screw it, the second form of this command

CreateDevice (D3DADAPTER_DEFAULT, D3DDEVTYPE_SW, MyWindow, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DInit, Device);

could assure that it will run and create the device in ANY card? Even a EGA one? :)

Share this post


Link to post
Share on other sites
Hm, the "CreateDevice (D3DADAPTER_DEFAULT, D3DDEVTYPE_SW, MyWindow, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DInit, Device);" neither worked with this card... although the games run as well... for e.g. Q3, UT and some 2D games... then how to create the device in this card?

Share this post


Link to post
Share on other sites
Quote:
Original post by BigBeginner
Hm, the "CreateDevice (D3DADAPTER_DEFAULT, D3DDEVTYPE_SW, MyWindow, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DInit, Device);" neither worked with this card... although the games run as well... for e.g. Q3, UT and some 2D games... then how to create the device in this card?

Use D3DDEVTYPE_HAL instead of D3DDEVTYPE_SW. That latter is for pluggable software devices (i.e. a plugin device). You want HAL + SOFTWARE_VERTEXPROCESSING.

Share this post


Link to post
Share on other sites

This topic is 4354 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this