Slow framerate of Zen demos with DirectX 8.1

Started by
4 comments, last by BS-er 22 years, 3 months ago
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
Value of good ideas: 10 cents per dozen.Implementation of the good ideas: Priceless.Machines, Anarchy and Destruction - A 3D action sim with a hint of strategy
Advertisement
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
Value of good ideas: 10 cents per dozen.Implementation of the good ideas: Priceless.Machines, Anarchy and Destruction - A 3D action sim with a hint of strategy
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.
-------------------------------------------------------- What''s the difference between engineers and architects? Engineers build weapons; architects build targets. --------------------------------------------------------
the X in D3DFMT_X8R8G8B8 means that those bits are unused.
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.
-------------------------------------------------------- What''s the difference between engineers and architects? Engineers build weapons; architects build targets. --------------------------------------------------------
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.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement