Repository navigation
render: make set_framebuffer/get_framebuffer protected - #205
Merged
Merged
Conversation
The current framebuffer is tracked by the base class (cur_fb); renderers that need the current framebuffer height (e.g. to convert scissor/viewport rects to their native bottom-left origin convention) now read it through get_framebuffer() instead of keeping their own duplicate member.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #205 +/- ##
=======================================
Coverage 28.55% 28.55%
=======================================
Files 239 239
Lines 8945 8945
Branches 2785 2785
=======================================
Hits 2554 2554
Misses 6057 6057
Partials 334 334 ☔ View full report in Codecov by Harness. |
igagis
approved these changes
Nov 30, 2026
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
The base rendering context already tracks the current framebuffer (
cur_fb) viaset_framebuffer()/get_framebuffer()— both wereprivate:.Renderers that convert scissor/viewport rects between the framework's top-left origin convention and their native bottom-left origin (OpenGL, OpenGL ES) need to read the current framebuffer's height. Two options:
current_fbmember (what the OpenGL/OpenGLES renderers had done), orprotected:so subclasses readget_framebuffer().This PR does (2).
frame_buffer::apply()is a friend and unaffected.Notes
ruistarget after this change is required (stale objects fail to link).