Jump to content
  • Advertisement

Archived

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

Zook

Triple buffering

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

Can''t seem to get triple buffering to work. I have set the backbuffercount to 2, but the framerate still jumps between refreshrate and refreshrate/2. Is there something more that should be done?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
TRIPLE BUFFERING means that whatever you show on the screen will be drawn 3 times before it shows up on the monitor. Forget about triple buffering - it only slows down the app.

Share this post


Link to post
Share on other sites
triple-buffering is sometimes useful, but it won''t speed up your overall framerate if you can''t feed frames into the buffer fast enough.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Check the code that you are using to do the actual flip - it is possible to explicitly say which surface you want to flip from, and if you are accidentally doing this for, you might be always flipping between the same 2 surfaces leaving your third buffer unused.

quote:
triple-buffering is sometimes useful, but it won''t speed up your overall framerate if you can''t feed frames into the buffer fast enough.


It sounds like it would be useful here, since the framerate is stuck on harmonics of the refresh rate.

quote:
TRIPLE BUFFERING means that whatever you show on the screen will be drawn 3 times before it shows up on the monitor. Forget about triple buffering - it only slows down the app.

What are your reflex speeds? Long enough that being one (or 2) frames behind isn''t going to matter. Your mind is very good at adjusting to stuff where feedback is delayed, but it works best if feedback is delayed by a constant amount - thus triple buffering will help as the framerate will be constant (hopefully).

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites
Actually, triple buffering sometimes will help.

The blitter doesn''t do anything if it''s waiting for the vertical refresh during flips. This waste can be eliminated if there is a third buffer. While the flip is waiting to be done, the blitter can continue to blit onto the third buffer. This will increase your frame rates.

Share this post


Link to post
Share on other sites
Preferably you should let the user chose if s/he wants to triple buffer or not. Triple buffering would work very differently on different machines. Some machines might have a fast refresh rate but you app wont be able to draw th scene threee times fast enough. while others might be able to draw 3 times very fast and then have to wait for the vertical retrace thingy. Triple buffering would most of the time slow the app down becuase of having to draw the sme thing over 3 times and haveing to also flip extra times.

I guess you''ll have to experiment a lot with it


:::: [ Triple Buffer V2.0 ] ::::

Share this post


Link to post
Share on other sites
You don''t draw the same thing several times, but what you draw this frame won''t be displayed until two frames later instead of the next frame, and you still only flip once per frame. One disadvantage is of course that you loose some vid mem. Anyway, it works fine now after I switched from D3DSWAPEFFECT_DISCARD to D3DSWAPEFFECT_FLIP.

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!