Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Failed creating the Direct3D device

212 views
Skip to first unread message

Sergio Cossa

unread,
Apr 13, 2005, 8:57:26 AM4/13/05
to
Hi!

I am newbie in DirectX. I have the DirectX 9.0 SDK Update - (April 2005)

I need to test from a PC that has a card SYS 6326 AGP with 8 MB.

When I run the DirectX Diagnostic Tool, I see "Direct3D 9 test results: All
tests were successful."

But, when I test any sample, I see "Could not initialize Direct3D. This
tutorial will exit." or "Failed creating the Direct3D device"

Definitively it is a problem of the card? or will exist more something?

Thanks in advance!

Sergio Cossa
Argentina


Sergio Cossa

unread,
Apr 13, 2005, 9:45:21 AM4/13/05
to
Thanks Patrice!
Yes I see the rotating cube... I test with 16 and 24 bits True Color (max of
this card)
I have done others tests... in Managed DX with C#.
The device fail to initialize when I set this parameter:

presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil

without mattering that if is in windowed or full screen.

Best regards!

Sergio Cossa
Argentina

"Patrice Scribe" <@> wrote in message
news:O4zM5xCQ...@TK2MSFTNGP14.phx.gbl...
Does DX diag renders the rotating cube ? If yes what is the current bit
depth of your desktop ?

For now my guess would be that your current display mode is not compatible
with hardware accelration (8 bits and I believe on some hardware 24 bits).
This would explain why it works in full screen (as the application choose
from the available modes) and why it fails in windowed mode (where the
application most often have to use the current mode).

Patrice

"Sergio Cossa" <sergi...@arnet.com.ar> a écrit dans le message de
news:uZ8TWiCQ...@TK2MSFTNGP14.phx.gbl...

Sergio Cossa

unread,
Apr 13, 2005, 9:54:42 AM4/13/05
to
I run DirectX Caps Viewer.
In the tab of my adapter ( SYS 6326 ) I see:

D3D Device Types
-- HAL
---- Adapter Formats
-------- D3DFMT_R5G6B5 (Windowed)
---------- Render Format Compatibility
----------- D3DFMT_R5G6B5
------------ D3DMULTISAMPLE_NONE ( 1 quality level )
-------------- Compatible Depth/Stencil Formats
---------------- D3DFMT_D16 ( 1 quality level )

Sergio Cossa
Argentina

"Sergio Cossa" <sergi...@arnet.com.ar> wrote in message
news:%23Yc1I9C...@TK2MSFTNGP09.phx.gbl...

Phil Taylor

unread,
Apr 13, 2005, 12:01:46 PM4/13/05
to
so DX works with 16 and 32 bit, not with 24.

are you in 24-bit mode? if so, thats the problem.

do the C++ samples run?

"Sergio Cossa" <sergi...@arnet.com.ar> wrote in message

news:e1BjXCDQ...@TK2MSFTNGP09.phx.gbl...

Sergio Cossa

unread,
Apr 13, 2005, 3:35:51 PM4/13/05
to
Again, I am new in DirectX.

I work with 16 bit.

I run CheckDepthStencilMatch() and I obtained OK with:

DeviceType.Hardware
DepthFormat = D16
AdapterFormat = X1R5G5B5
BackBufferFormat = X1R5G5B5

I test Tutorial 1, 2 and 3. All OK.

Soon, I want to test the Tutorial 4 of Managed DX, and

presentParams.Windowed=true; // We don't want to run fullscreen
presentParams.SwapEffect = SwapEffect.Discard; // Discard the frames


presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil

presentParams.AutoDepthStencilFormat = DepthFormat.D16; // And the stencil
format
device = new Device(0, DeviceType.Hardware, this,
CreateFlags.SoftwareVertexProcessing, presentParams); //Create a device

the last line sends an exception... It cannot initialize Direct3D.

Best regards.
--
Sergio Cossa
Argentina

"Phil Taylor" <pta...@private-citizen.com> wrote in message
news:%23tqVRHE...@TK2MSFTNGP09.phx.gbl...

Phil Taylor

unread,
Apr 14, 2005, 9:36:56 AM4/14/05
to

you know you have really bad hw?

what if you switch to hw or mixed vertex processing?

does the debug runtime output contain additional information?

do the samples run?

"Sergio Cossa" <sergi...@arnet.com.ar> wrote in message

news:O$%23BABGQ...@tk2msftngp13.phx.gbl...

Sergio Cossa

unread,
Apr 14, 2005, 11:12:09 AM4/14/05
to
Thanks Phil,

Some simple examples work, other no, I assume that by the limited adapter.

Just I could run all Tutorials using: DeviceType.NullReference or
DeviceType.Reference

If I use DeviceType.Hardware or DeviceType.Software the exception on
Tutorial 4 is:

_message "Error in the application."
_source "Microsoft.DirectX.Direct3D"

_stackTraceString " at Microsoft.DirectX.Direct3D.Device..ctor(Int32
adapter, DeviceType deviceType, Control renderWindow, CreateFlags
behaviorFlags, PresentParameters[] presentationParameters)\r\n at
LightsTutorial.Lights.InitializeGraphics() in c:\\program files\\microsoft
directx 9.0 sdk (april
2005)\\samples\\managed\\direct3d\\tutorials\\tutorial4\\lights.cs:line 54"

ErrorCode -2005530518
ErrorString "D3DERR_NOTAVAILABLE" or ErrorString "D3DERR_INVALIDCALL"

Now already I can work a little, until changing my adapter in the next days
:)

Thanks again Phil and Patrice!

Sergio Cossa
Argentina

"Phil Taylor" <pta...@private-citizen.com> wrote in message

news:e9%23LXuPQ...@TK2MSFTNGP09.phx.gbl...

Phil Taylor

unread,
Apr 15, 2005, 11:34:21 PM4/15/05
to
so the runtime is telling you it cant create a HAL.

which is strange if DXDiag passed all tests. you can confirm that you have a
DX7-level DDI driver, as reported in the saved DXDiag text file. the DX9
interfaces wont work without that...

hey, at least decent hw is cheap these days.

one other thing, for future reference is to run under the debug runtime,
enable unmanaged debugging, and look at the debug runtime output ( be sure
to turn up the debug level in the DX control panel ). the debug runtime
always contains info on failures. always.

"Sergio Cossa" <sergi...@arnet.com.ar> wrote in message

news:%23yQKVSQ...@tk2msftngp13.phx.gbl...

govind prasad

unread,
Nov 18, 2009, 8:41:50 AM11/18/09
to
HI

IN INSTALING MY PC GAME ONIMUSHA3 PC BUT THIS GAME IS DONT RUN WHEN
PLAYING THIS GAME ERROR MESSAG FAILD CREAT THE DIRECT 3D DEVICE BUT I HAVE
ALRADY INSTALING MY PC DIRECT3D 9 AND GRAPIC CARD AND SOUND DRIVER PLEASE
HELP ME.


THANKS

url:http://www.ureader.com/msg/1467114.aspx

0 new messages