Archived

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

Swatter555

FPS in DirectDraw

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
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
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