Discussion:
Failed creating the Direct3D device
(too old to reply)
Sergio Cossa
2005-04-13 12:57:26 UTC
Permalink
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
unknown
2005-04-13 13:26:56 UTC
Permalink
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
Post by Sergio Cossa
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
2005-04-13 13:45:21 UTC
Permalink
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:***@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
Post by Sergio Cossa
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
2005-04-13 13:54:42 UTC
Permalink
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" <***@arnet.com.ar> wrote in message news:%***@TK2MSFTNGP09.phx.gbl...
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:***@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
Post by Sergio Cossa
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
Phil Taylor
2005-04-13 16:01:46 UTC
Permalink
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?
Post by Sergio Cossa
I run DirectX Caps Viewer.
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
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#.
presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil
without mattering that if is in windowed or full screen.
Best regards!
Sergio Cossa
Argentina
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
Post by Sergio Cossa
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.
All
Post by Sergio Cossa
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
2005-04-13 19:35:51 UTC
Permalink
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" <***@private-citizen.com> wrote in message news:%***@TK2MSFTNGP09.phx.gbl...
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?
Post by Sergio Cossa
I run DirectX Caps Viewer.
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
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#.
presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil
without mattering that if is in windowed or full screen.
Best regards!
Sergio Cossa
Argentina
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
Post by Sergio Cossa
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.
All
Post by Sergio Cossa
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
Phil Taylor
2005-04-14 13:36:56 UTC
Permalink
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?
Post by Sergio Cossa
Again, I am new in DirectX.
I work with 16 bit.
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
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?
Post by Sergio Cossa
I run DirectX Caps Viewer.
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
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#.
presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil
without mattering that if is in windowed or full screen.
Best regards!
Sergio Cossa
Argentina
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
Post by Sergio Cossa
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.
All
Post by Sergio Cossa
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
2005-04-14 15:12:09 UTC
Permalink
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" <***@private-citizen.com> wrote in message news:e9%***@TK2MSFTNGP09.phx.gbl...

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?
Post by Sergio Cossa
Again, I am new in DirectX.
I work with 16 bit.
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
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?
Post by Sergio Cossa
I run DirectX Caps Viewer.
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
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#.
presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil
without mattering that if is in windowed or full screen.
Best regards!
Sergio Cossa
Argentina
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
Post by Sergio Cossa
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.
All
Post by Sergio Cossa
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
Phil Taylor
2005-04-16 03:34:21 UTC
Permalink
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.
Post by Sergio Cossa
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
_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
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?
Post by Sergio Cossa
Again, I am new in DirectX.
I work with 16 bit.
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
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?
Post by Sergio Cossa
I run DirectX Caps Viewer.
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
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#.
presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil
without mattering that if is in windowed or full screen.
Best regards!
Sergio Cossa
Argentina
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
Post by Sergio Cossa
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.
All
Post by Sergio Cossa
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
govind prasad
2009-11-18 13:41:50 UTC
Permalink
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

unknown
2005-04-13 14:14:31 UTC
Permalink
And do you deifne the format for the depth buffer ? What it is ? Do you call
CheckDepthStencilMatch ?

You have to call CheckDepthStencilMatch to find a suitable format and you
have then to specify this suitable format. Using the debug runtime may also
help to see whay D3D complains...
--
Patrice
Post by Sergio Cossa
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#.
presentParams.EnableAutoDepthStencil = true; // Turn on a Depth stencil
without mattering that if is in windowed or full screen.
Best regards!
Sergio Cossa
Argentina
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
Post by Sergio Cossa
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.
All
Post by Sergio Cossa
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
Loading...