Jump to content
  • Advertisement

Archived

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

Swatter555

FPS in DirectDraw

This topic is 5600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive got the basics of my 16bit engine setup, but even with an empty GameMain() I only get 78fps. Its emtpy besides the frame counting code. Im not sure what would be holding things up. I just set up the bare basics at up to this point. Im thinking it might be my frame counting algorithm. //Global DWORD timer; int frame_count; GameInit() { timer = GetTickCount(); } //////////// GameMain() { flip() if(GetTickCount() - timer >= 1000) print gdi frame rate to screen reset timer,counter else ++frame_count } Anyway, thats the rough basics. Am I using the GetTickCount() correctly? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
You probably have vsync turned on. You can try this:

primarySurface->Flip(0, DDFLIP_NOVSYNC);

Although personally I highly recommend keeping vsync on. It will avoid tearing.

Share this post


Link to post
Share on other sites
Thanks bro, that was it. I get some insane # like 75,000 now. That cant be right either? Lol, even so that helps. Ill adjust the NOSYNC when my application is done. I love this board!

Share this post


Link to post
Share on other sites
what kinda board do you have?

oh yeah btw does Direct3D:resent() default to VSYNC on?

[edited by - Cipher3D on August 10, 2003 8:25:24 PM]

Share this post


Link to post
Share on other sites
I have a GEForce 4 Ti4200.

Could the one call per second to a GDI text function really kill performance that much? Its not even performing a Blt.

With the VSYNC off, it gets crazy frame rates. When my engine is put to a tougher test, Ill see how it works both ways.

Share this post


Link to post
Share on other sites
IDirect3DDevice9:resent() uses whatever mode you set in your present parameters structure.

D3DPRESENT_INTERVAL_DEFAULT turns vsync on.
D3DPRESENT_INTERVAL_IMMEDIATE turns vsync off.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!