Learning DirectX 9.0

Ac3b325b7ea6bacd7a234bfab8e50205
0
kyliej 101 Jul 20, 2004 at 05:09

Hi,

I am new to DirectX and have been trying to get the SDK tutorials to run for me. I have a different problem to those recently posted. My code for Tutorial1 (Creating a device) compiles but fails when the call to create a new device is made. I get the message box with “Could not initialize Direct3D. This tutorial will exit.”. Some of the samples compile and run ok, some compile but show an empty (grey) window when run.

Any ideas?

Kylie

2 Replies

Please log in or register to post a reply.

2b97deded6213469bcd87b65cce5d014
0
Mihail121 102 Jul 20, 2004 at 06:56

I have some idea: leave the tutorials, get a book and start doing stuff correctly. Normally tutorials are suitable for small stuff but not for something as huge as Direct3D.

22b3033832c5c699c856814b0cf80cb1
0
bladder 101 Jul 20, 2004 at 11:21

It’s probably because the D3DPRSENT_PARAMETERS you supplied were not supported by the graphics card you have. You need to give the structure parameters that the graphics card can handle. For example if your graphics card dosnt support 32 bits color, you cant give a desktop format such as X8R8G8B8, because then CreateDevice will fail.

Check the site in my sig for some very basic direct3d tutorials.