toggle srgb on per framebuffer basis#2729
Conversation
|
🖼️ Screenshot tests have failed. The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests. 📄 Where to find the report:
✅ If you did mean to change things: ✨ If you are creating entirely new tests: Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar". See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information Contact @richardTingle (aka richtea) for guidance if required |
There was a problem hiding this comment.
Code Review
This pull request introduces logic to manage sRGB write state for framebuffers in the GLRenderer, including a new toggleFramebufferSrgb method and state tracking in RenderContext. The review identified a critical issue where the code references a non-existent Caps.SrgbWriteControl constant, which will lead to compilation errors. Additionally, there is a suggestion to move the RenderContext state update inside the capability check to ensure it accurately reflects the GL state.
|
@gemini-code-assist pls new review |
There was a problem hiding this comment.
Code Review
This pull request introduces state tracking for sRGB framebuffer writing to ensure consistent behavior across different framebuffers. It adds a srgbWriteEnabled field to RenderContext and a toggleFramebufferSrgb method to GLRenderer to manage the GL_FRAMEBUFFER_SRGB_EXT state during binding and copying operations. The review feedback highlights the need to initialize the new state field in RenderContext to avoid desynchronization after a context reset and suggests an optimization for the toggleFramebufferSrgb method to check for hardware capabilities early.
|
@gemini-code-assist pls new review |
There was a problem hiding this comment.
Code Review
This pull request introduces tracking and toggling of the sRGB write state by adding a srgbWriteEnabled flag to RenderContext and a toggleFramebufferSrgb method to GLRenderer. The feedback suggests removing redundant assignments in copyFrameBuffer and optimizing toggleFramebufferSrgb with an early return for hardware capability checks and improved Javadoc capitalization.
This makes srgb framebuffer usable in offscreen rendering