Skip to content

Conversation

@nulldoubt
Copy link

A framebuffer sequence may now be nested using the FrameBuffer.begin() and FrameBuffer.end() methods.

This means that the previously bound framebuffer, if available, will be automatically bound again.

See issue #7561 for more context.

@mgsx-dev
Copy link
Contributor

There are too many mistakes in this PR. (wrong class, duplicated code, unwanted synchronized code, many side effects that could break existing code, ...)

Also, as mentionned bt @crykn in the issue :

However, IIRC the consensus seems to have been to make the nestability optional, since checking the currently bound framebuffer isn't free and could negatively affect performance.

Requesting to reject it.

@nulldoubt
Copy link
Author

Hey, thanks for your feedback!

Maybe I misunderstood the need.

I now see as well that there's unnecessary synchronization.

Also, just to make sure that I'm not mistaking it again, the class to modify should be the base class GLFrameBuffer, not the regular FrameBuffer, right?

And finally, this feature shouldn't be forced... It should be optional, so a toggling method, maybe called setAutoRebind or something similar, should be available, right?

@Tom-Ski
Copy link
Member

Tom-Ski commented Mar 9, 2025

This seems to be something that should be handled externally in a util, rather than something that is baked deep into the framework internals. Much like how TextureBinder works, it is not enforced to be used.

NestedFrameBufferBinder {
begin(GLFramebuffer......)
end()

getCurrentBuffer()
getCurrentViewport

etc
} 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants