Archived

This topic is now archived and is closed to further replies.

GameDev135

Does Direct3d work well with WindowsXP

Recommended Posts

I recently installed WindowsXP. However, one of my games that uses Direct3d now runs at only 5 frames per second when it previously ran at close to 70 (under Windows ME). Then I checked some of the book examples and all of the ones which were only 2d graphics, ran at around 70 fps, but once it became 3d, they also ran at a measley 5 fps. I have reinstalled directx and also used the directx utilities to test the directx out but it still doesn''t work properly (even though it passed every single test). Does Direct3d not run properly on WindowsXP?

Share this post


Link to post
Share on other sites
Yes and No. For you, I STRONGLY reccomend you check your drivers. That MUST be the case. I haven''t noticed any performance drops from Win2k to XP but from 98 to Win2k I droped about 10 fps. Still kept me above 60+ fps on all the DX demos though and I only have a geforce 1 with a 733 pentium 3.

If you''ve tried to run Grand Theft Auto 3 on XP though, supposedly there is a bug in D3D8.lib which screws everything up (pissed me off the first time!). There''s a fix and you can find the link for it at the take 2 interactive website. Reinstalling DirectX btw probably won''t change anything (like that lib). The patch I mentioned does, but it''s a special circumstance. XP has it''s own version of DX 8 I believe, and it sucks a little. If nothing works, wait for the Service Pack I guess (ugh).

Share this post


Link to post
Share on other sites
I fixed the problem, but I was wondering if someone could explain to me why this is happening.

I basically compared the examples in my book that were under 2d stuff to the stuff which was 3d, mixed and matched, and eventually found there was one significant difference. In the init() function, I had it like this

r = InitDirect3DDevice(g_hWndMain,640,480,FALSE, D3DFMT_A8R8G8B8,
g_pD3D, &g_pDevice);

where it needs to be like this

r = InitDirect3DDevice(g_hWndMain,640,480,FALSE, D3DFMT_X8R8G8B8,
g_pD3D, &g_pDevice);


Does WindowsXP not support the alpha channel or something?

Thanks

Share this post


Link to post
Share on other sites
I'd say it has to do more with your drivers and hardware than with XP.

And you should enumerate available video modes instead of hardcoding them if you want your programs to run on computers other than yours.

[edited by - IndirectX on June 6, 2002 11:48:23 AM]

Share this post


Link to post
Share on other sites
ummm, whenever you create the d3d device you use D3DFMT_X8R8G8B8, not D3DFMT_A8R8G8B8 since most cards dont support alpha enabled back buffers. its not to say that you cant use alphablending, you certainly can. in fact i know the geforce3 drivers will also still allow dest alpha blending with a D3DFMT_X8R8G8B8 back buffer. instead create a texture and draw to that if you really want a D3DFMT_A8R8G8B8 buffer to draw to. (there should be no need).

Share this post


Link to post
Share on other sites