Does Direct3d work well with WindowsXP

Started by
5 comments, last by GameDev135 21 years, 10 months ago
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?
Feel free to email me at NYYanks432@hotmail.com if you have any questions
Advertisement
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).
"Artificial Intelligence: the art of making computers that behave like the ones in movies."www.CodeFortress.com
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
Feel free to email me at NYYanks432@hotmail.com if you have any questions
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]
---visit #directxdev on afternet <- not just for directx, despite the name
Thx. How can I enumerate the video modes? I know the syntax for an enumeration, but I don''t understand how to enumerate the video modes.
Feel free to email me at NYYanks432@hotmail.com if you have any questions
Look at d3dapp.cpp in the common files. It''s somewhat big, but I managed to understand it.
---visit #directxdev on afternet <- not just for directx, despite the name
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).

This topic is closed to new replies.

Advertisement