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

Author Topic: Do my framebuffers survive a window recreatation?  (Read 3810 times)

0 Members and 1 Guest are viewing this topic.

sharethis

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Do my framebuffers survive a window recreatation?
« on: March 14, 2013, 05:46:44 pm »
I use SFML to handle window and context creation for me. Since I implemented deferred shading, I make use of many framebuffers. When I recreate the window to switch to fullscreen, I get continuous OpenGL errors.

Do my framebuffers still exists after recreating the window? I do not know much about SFML's internal context handling but I know that for example shader programs are still available after window recreation.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Do my framebuffers survive a window recreatation?
« Reply #1 on: March 14, 2013, 05:52:49 pm »
Quote
Do my framebuffers still exists after recreating the window
Yes, they should.
Laurent Gomila - SFML developer

sharethis

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: Do my framebuffers survive a window recreatation?
« Reply #2 on: March 14, 2013, 07:27:18 pm »
Somehow, my calls to "glBindFramebuffer" cause invalid operation errors after the window was recreated. Whether I initially create the window in windowed or fullscreen mode, there are no errors and rendering works. But as I said after recreating the window it stops working.

GL_INVALID_OPERATION is generated if framebuffer is not zero or the name of a framebuffer previously returned from a call to glGenFramebuffers.

This lets me assume that the framebuffers aren't valid after window recreation anymore. What do you think?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Do my framebuffers survive a window recreatation?
« Reply #3 on: March 14, 2013, 08:15:29 pm »
You should write a complete and minimal example that reproduces the problem.
Laurent Gomila - SFML developer

Lynix

  • Sr. Member
  • ****
  • Posts: 403
    • View Profile
Re: Do my framebuffers survive a window recreatation?
« Reply #4 on: March 14, 2013, 10:10:33 pm »
Quote
Do my framebuffers still exists after recreating the window
Yes, they should.

http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt
Quote
* ARB FBOs are not shareable.

So I think they get destroyed with the window.
« Last Edit: March 14, 2013, 10:12:09 pm by Lynix »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Do my framebuffers survive a window recreatation?
« Reply #5 on: March 15, 2013, 07:57:52 am »
Quote
ARB FBOs are not shareable.
Oh... that's strange.

Thanks a lot :)
Laurent Gomila - SFML developer

 

anything