Archived

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

BS-er

Slow framerate of Zen demos with DirectX 8.1

Recommended Posts

BS-er    181
I recently installed DirectX 8.1 and the corresponding SDK, replacing DirectX 8.0. After the installation, many of the demos that came with The Zen of Direct3D Game Programming run very slow, around 5 FPS. Previously I''d get an FPS of 150. This is only in full screen mode. Windowed mode runs as fast as before. My system: Athlon 1.1 GHZ, Win ME, GeForce 2 with latest drivers Anyone else encounter this problem or know of a possible fix? The Battlezone Launch Pad

Share this post


Link to post
Share on other sites
BS-er    181
Well of course I found a solution only AFTER posting this. I don''t understand how my solution really fixed things though.

I simply replaced D3DFMT_A8R8G8B8 with D3DFMT_X8R8G8B8 in the setup code.

I wonder what limitations there are with using the D3DFMT_X8R8G8B8 format. Why the bad performance after installing 8.1? I guess it''s not urgent, but I''m curious.

The Battlezone Launch Pad

Share this post


Link to post
Share on other sites
keshtath    146
I found the same problem...
The difference is that the D3DFMT_A8R8G8B8 uses an alpha channel while the X8R8G8B8 doesnt seem to support that feature. I''m actually looking for more information on this too.
If what I said is true this is a big problem for me also.

Share this post


Link to post
Share on other sites
keshtath    146
Okay I''ve done some tests...
If you change D3DFMT_A8R8G8B8 to D3DFMT_X8R8G8B8 you are disabling the alpha channel support for texture/bitmaps. If you make those changes to the chapter 16 sample (For example) you will get a good frame rate but the FPS counter will now have a pink box around it (color keying not working).
As to why the frame rate sucks when using D3DFMT_A8R8G8B8 in DX8.1, I''m still looking for an answer.

On the demos I get 10fps on a p3-1ghz with a gf3ti500.
On a side note that book sucks! What a waste of $50.00. He tells you to do stuff that everyone else says not to do. Not to mention there are no decent examples and the samples are poorly written and poorly documented. If anyone can recommend a better DX8 book please do.

Share this post


Link to post
Share on other sites
Promit    13246
I actually didn''t notice any problems with the D3DFMT_A8R8G8B8 flag...i was getting a good 60-75 FPS at all times.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post


Link to post
Share on other sites