Archived

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

Drakex

stupid framerate issues with DX9

Recommended Posts

i just got the DX9 SDK, and thankfully, all i needed to change my DX8 project overt was basically change all the 8s to 9s and change a few parameters with the screen init. which i think is part of the problem. it works -- but there''s a bit of a problem. the FPS fluctuates wildly between about 60 and 10 at regular intervals of about once a second. it''s REALLY noticeable. this didn''t happen with DX8 and it doesn''t happen with any of my games that use DX. (possibly because they''re using DX7/8 interfaces..) now here''s why i think the screen init was part of the problem. the D3DSWAPEFFECT enum constant has been changed. in DX8 i used a type that no longer exists. it was one of the things i had to change. i tried all 3 types of screen update and they all have the exact same problem. i noticed the help talked about swap chains and such.. would i have to set one up? has anyone else had this problem?? __________________________________________ you just think i''m here. i''m really not.

Share this post


Link to post
Share on other sites
thanks for all the help people!!

jeez you go on for 18 replies about how you can write C code in C++ but you don''t respond once to a simple question.

__________________________________________
you just think i''m here. i''m really not.

Share this post


Link to post
Share on other sites
hey! guess what guys! i still haven''t figured this out!

mind helping or are you just going to ignore me some more?

__________________________________________
you just think i''m here. i''m really not.

Share this post


Link to post
Share on other sites
wow finally some answers

i doubt it''s my video card.. it worked fine with 8.1 and my card is designed to work with DX9, so..

here''s a little code snippet:

d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;

little huh?

i''m not doing anything really complex here either. just rendering a few cubes and a sphere, 2 lights, and pumping out the frames as fast as it''ll allow.. no framerate limiting or anything.

i don''t get it.

__________________________________________
you just think i''m here. i''m really not.

Share this post


Link to post
Share on other sites
Are you running with the debug DirectX9 runtimes? If not, try switching to them (via the DirectX9 applet in the control panel) and cranking up the debug output level to maximum. Then, when you run your exe, take a look at the debug output for any [strange] messages, errors, or warnings.

If that proves unsuccessful is there anyway you can post, say, a link to your source code so that people who may be able to help can actually take a quick look through it?

Regards,
Sharky


---
#define _WEBSITE
Sharky''s Coding Corner
#endif
---

Share this post


Link to post
Share on other sites
ah!

found it!

i got to thinking it HAD to be something about the backbuffers. so i looked in the help (some RTFM there..) and found a parameter for the D3DPRESENT_PARAMETERS struct called PresentationInterval. i set it to ONE, which is on the vsync -- and now it works. doo dee doo..

well uhh thanks i guess. to the people who posted anyway.

[edited by - Drakex on March 18, 2003 9:04:39 PM]

Share this post


Link to post
Share on other sites