Jump to content
  • Advertisement
Sign in to follow this  
BigBeginner

Direct3D8 create error

This topic is 4690 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!