SFML community forums

Help => Graphics => Topic started by: asdatapel on September 05, 2011, 04:57:59 am

Title: Frame Buffer
Post by: asdatapel on September 05, 2011, 04:57:59 am
Is there a framebuffer objectin sfml?If not, can someone show me how to remove tearing from an application? Thanks.
Title: Frame Buffer
Post by: Laurent on September 05, 2011, 07:32:07 am
The equivalent of FBO in SFML (2, not 1.6) is the sf::RenderTexture class.

But how would it remove tearing?
Title: Frame Buffer
Post by: thePyro_13 on September 05, 2011, 08:55:24 am
Doesn't SFML use page flipping(what I assume you want to implement with frame buffers) internally anyway? If you're still getting tearing then you need to enable Vertical Sync.
Title: Frame Buffer
Post by: asdatapel on September 05, 2011, 05:19:59 pm
Quote from: "Laurent"
But how would it remove tearing?

I dunno, I thought that was what framebuffers were for. What is the renderTexture used for?
Title: err...sorry
Post by: asdatapel on September 05, 2011, 05:23:21 pm
I just found out that what Im looking for is called a doublebuffer. Sorry. Is there a doublebuffer in SFML?
Title: Frame Buffer
Post by: Laurent on September 05, 2011, 06:00:51 pm
Yes, SFML always uses a double-buffer.
Title: Frame Buffer
Post by: asdatapel on September 05, 2011, 06:03:14 pm
ok thanks. Another question: does changing the window's framelimit change how many times the main loop is gone through, or just how many times its rendered?
Title: Frame Buffer
Post by: Laurent on September 05, 2011, 06:20:59 pm
It pauses the whole application (the pause is hidden in the Display function), so it changes how many times the main loop is gone through.