Archived

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

Swatter555

FPS in DirectDraw

Recommended Posts

Swatter555    127
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
C0D1F1ED    452
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
Swatter555    127
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
Cipher3D    340
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
Swatter555    127
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