Repository navigation
Conversation
finishRender() cleared the framebuffer stack every frame, so a later end() logged "unbalanced fbo bind/unbind" even when the window was already bound. Warn at the end of the frame if an ofFbo is still bound, and keep a matching begin()/end() quiet. A begin() that binds an ofFbo onto itself still pushes, so its end() pops the same entry. Both GL renderers share the stack rules.
Member
Author
|
This is an interesting way to handle FBO issues if detected by using fbo binding deque. I had applied similar fixes for fbo textures binding in unity many years ago after leaks were detected in production game. Code assisted with Grok for this one with my code examples linking to initial reported issue |
danoli3
added a commit
to danoli3/openFrameworks
that referenced
this pull request
Oct 31, 2026
openframeworks#8631 is still open, so the 0.12.2 summary keeps merged changes only.
danoli3
added a commit
that referenced
this pull request
Nov 1, 2026
* CHANGELOG: main changes since 0.12.1 for 0.12.2 Grouped like earlier releases (core, gl, graphics, utils, addons, libraries; linux, windows, macos / ios / tvos, android, emscripten, makefiles), each linked to its PR. The full commit list is added at release. * CHANGELOG: changes merged since Oct 27 (packages, nightly, apothecary pin, Emscripten 6.0.13, ccache) * CHANGELOG: CMake, Android NDK r30, and merges since Oct 30 Adds the CMake build, moves Android from NDK r29 to r30, and notes FreeImage 3.19.28, the VS Code project generator flag, iOS / tvOS ccache, GLFW window focus, and CI failing when an example build fails. * CHANGELOG: Debian installs x11proto-dev Notes #8630, which fixes the Debian 13 install stop in #8481. * CHANGELOG: ofFbo end() is reported when the frame ends * CHANGELOG: add the 0.12.2 banner * CHANGELOG: packages bundle the projectGenerator nightly * CHANGELOG: drop the unmerged ofFbo note #8631 is still open, so the 0.12.2 summary keeps merged changes only. * CHANGELOG: add the 0.12.2 commit list Commits from 0.12.1 (1019e6a) through master (761df7c), ancestry-path, in the same one-line format as 0.12.1. * CHANGELOG: 0.12.2 list with one described entry per pull request The 0.12.2 list had 208 lines: every commit of every merged branch ("no message", "Windows", "curl debug"), merge commits next to the commits they merged, and each Emscripten, submodule and oF Menu version bump separately. It now has one entry per pull request merged into master since 0.12.1 (first-parent history, rebase-merged commits under their pull request), each with what it does, and the repeated version bumps as one entry each: Emscripten 4.0.4 -> 6.0.13, the submodule updates, oF Menu 0.3.0 -> 0.4.3, Android NDK r29 -> r30, ccache, GitHub Actions and the nightly fixes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
finishRender()cleared the framebuffer stack at the end of every frame. The nextofFbo::end()then logged:even when the window was already bound. A real forgotten
end()was only reported on the following frame. The same path is inofGLRendererandofGLProgrammableRenderer.bind()also returned early when an ofFbo was bound onto itself, so the matchingend()under-popped the stack.Both renderers now share one stack in
ofFramebufferBinding.h:begin()/end()inside the frame is silent. The window entry pushed bystartRender()stays untilfinishRender().end()warns once when the frame ends, with the framebuffer id that was still bound, and binds the window again. A laterend()stays quiet.end()while only that window entry is left warns once and does not pop it.end()pops the same entry.startRender()binds the window framebuffer, so the GL binding matches the id the stack records.The check at the end of the frame uses the bound id, not
stack.back(). Afterbegin()from the window the stack is[window, window]while the ofFbo is current, soback() == windowwould miss a forgottenend().Fixes #8564
Test
tests/gl/fboBindStackruns the stack with no GL context (balanced pair, forgottenend(), extraend(), begin/end outside a frame, self-bind, nested ofFbos).Local macOS makefile build of that test: