Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Frame Buffer  (Read 6741 times)

0 Members and 1 Guest are viewing this topic.

asdatapel

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Frame Buffer
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Frame Buffer
« Reply #1 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?
Laurent Gomila - SFML developer

thePyro_13

  • Full Member
  • ***
  • Posts: 156
    • View Profile
Frame Buffer
« Reply #2 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.

asdatapel

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Frame Buffer
« Reply #3 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?

asdatapel

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
err...sorry
« Reply #4 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Frame Buffer
« Reply #5 on: September 05, 2011, 06:00:51 pm »
Yes, SFML always uses a double-buffer.
Laurent Gomila - SFML developer

asdatapel

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Frame Buffer
« Reply #6 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Frame Buffer
« Reply #7 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.
Laurent Gomila - SFML developer

 

anything