Jump to content
  • Advertisement

Archived

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

branhield

Low FPS!!

This topic is 5922 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

how come i get lower FPS in my application that loads 3 bitmaps and move them around on the screen than i do in games like Age of Empires or whatever...

Share this post


Link to post
Share on other sites
Advertisement

There can be lots of resaons why you get low fps.

If you use simple GDI then results ain''t too good, but with DirectX you should get quite high fps. And it shouldn''t depend on how big are the pictures when you only have 3.

I guess there is something else wrong in the app or FPS counter is just faulty.

Share this post


Link to post
Share on other sites
Toomas008 said, there are a load of reasons why you could be getting a low fps. I am assuming you are using OpenGL to display your bitmaps, since you posted this in the OpenGL forum...(textured quads/pixmaps?)

Here are a few possibilities I can think of...

1. Dodgy FPS counter: using GDI text for your frame counter is slow. Use bitmap or texture fonts. Also, you should really be using QueryPerformanceCounter() for your timer. Do not under any circumstances use the windows timer (the one which sends WM_TIMER messages) it is as slow as hell.

2. Bad Renderloop structure: If your OpenGL rendering code is in your WM_PAINT handler, and you are using InvalidateRect() or some similar method to force redraws, you will always have a crap frame rate. The windows message queue is slow - keep your rendering loop outside it.

3. Unnecessary state changes: are you changing OpenGL state more than you have to? Some state changes are slower than others, but ideally you want to minimize them as much as possible, perhaps by sorting your objects in a suitable manner.

4. Doing something stupid: It could just be that you are doing something silly somewhere in your code - like reloading your bitmaps from the file every frame. Given that you are only drawing three bitmaps and still getting a terrible frame rate, I would imagine that something like this is going on. You really want to have as little code as possible being called between frames.

[edited by - Sandman on May 3, 2002 7:37:54 AM]

Share this post


Link to post
Share on other sites
well its not hardware accelerated, im on a 166mhz 32 mbram...but still..im able to play age of empires and that kinda games at way higer fps rates than i run my simple application at..

Share this post


Link to post
Share on other sites
To elaborate, Direct Draw will be accelerated on almost any 2D card. OpenGL can will only be accelerated if you have a 3D card, otherwise it''ll revert to software, which is slow as hell. You can use it for 2D, but you''ll need a 3D card.

____________________________________________________________
www.elf-stone.com

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!