Jump to content
  • Advertisement

Archived

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

okonomiyaki

More than 1 backbuffer?

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

What''s the point? When might one need more than 1 backbuffer? I remember somebody suggesting it to solve a problem before, but I totally forget what it was.. and it''s annoying me now. What kind of advantages does it give to use more than 1?

Share this post


Link to post
Share on other sites
Advertisement
More than 1 backbuffer can help with speed issues if the performance is being hindered due to waiting for vsync. With more than 1 backbuffer, graphic data can be written to that buffer while waiting (for vsync) to flip the other to the screen. DirectX won't use it, though, if you don't have enough video memory.
-Sam

[edited by - SamCN on June 1, 2002 3:46:28 PM]

Share this post


Link to post
Share on other sites
Interesting.. so it could be a solution to my problem with low frame rates in full screen? It goes from 300 fps about down to 60 when I switch it to fullscreen. Making 2 back buffers would solve this? I tried increasing the backbuffer count but there must be something else to do because it was giving me a run-time error (DX 8.1).

Share this post


Link to post
Share on other sites
G''day!

In full-screen, by default, is synced to the refresh rate, which in your case is probably 60Hz. You can change it to present immediately, but then you risk tearing and other graphical unpleasantness.

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Can you increase the refresh rate? 60hz is unbarable unless you are using a TV or something...

on a side note: I use 2 backbuffers, one for 3d rendering and a separate one for all my old 2D code. I did that to improve performance on my new video card, writing to a 3d surface was just way to slow

Share this post


Link to post
Share on other sites
You can by changing manually the FullScreen_RefreshRateInHz (something like that) paramater of the Presentation Parameters of the device.. it''s dangerous though if you don''t check to see if the computer supports the refresh rate, I''m not sure how to get the supported refresh rate. But yeah, I manually put mine to 100 hz and raised the FPS to about 100 or so, but that''s something you just can''t do in a real application. If you can find a way to check to see if the computer supports a refresh rate, and you find that it does, then you can put that value in the RefreshRate parameter of the PP and it''ll change it.

Share this post


Link to post
Share on other sites
This will get the best possible refresh rate


D3DDISPLAYMODE dm;
short maxcounter;
short counter;
UINT highesthz = 0;

maxcounter= p_D3D->GetAdapterModeCount(D3DADAPTER_DEFAULT);
for(counter = 0; counter < maxcounter; counter++)
{
p_D3D->EnumAdapterModes(D3DADAPTER_DEFAULT, counter, &dm);
if(Width == dm.Width && Height == dm.Height)
{
if(dm.RefreshRate > highesthz)
{
highesthz = dm.RefreshRate;
}
}
}
d3dpp.FullScreen_RefreshRateInHz = highesthz;

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!