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

Author Topic: more and better control over context activating and framebuffer binding  (Read 2968 times)

0 Members and 1 Guest are viewing this topic.

beauxq

  • Newbie
  • *
  • Posts: 7
    • View Profile
It would be nice to have more and better control over context activating and framebuffer binding.

After a few hours looking for a bug in my program, I found out RenderTexture::create activates a new context. (The documentation doesn't say that it activates a new context.)
Why not wait until we call RenderTexture::setActive?

RenderTexture::create also binds a framebuffer. It would be nice to be able to bind a framebuffer without activating a new context, and to choose when it binds instead of during create. A static bind function like Shader::bind and Texture::bind maybe?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Usually, when you request modifications or new features, you explain why, possibly with one or more relevant use cases. We're not going to do it just because you ask ;)
Laurent Gomila - SFML developer

beauxq

  • Newbie
  • *
  • Posts: 7
    • View Profile
The most common strategies for implementing 3 dimensional shadows involve rendering multiple times with the same set of vertices.

Rendering multiple times means binding different framebuffers.

Using the same set of vertices means it would be nice to use the same VAOs, but VAOs don't carry across different contexts.

So it would be nice to have an easy way of binding different framebuffers without changing the context.