Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leave GL_FRAMEBUFFER_SRGB disabled by default #27

Closed
szabolcsdombi opened this issue Aug 8, 2022 · 2 comments
Closed

Leave GL_FRAMEBUFFER_SRGB disabled by default #27

szabolcsdombi opened this issue Aug 8, 2022 · 2 comments

Comments

@szabolcsdombi
Copy link
Owner

Despite it is recommended to keep this enabled, it breaks integrations like imgui rendering to the default framebuffer.
Also it affects the glBlitFramebuffers in an odd way copying between non srgb and srgb images.
With the zengl examples it is more common to disable it for the blit than to actually use it while enabled.
Some drivers are not supporting GL_FRAMEBUFFER_SRGB according to the specs.

ZenGL should enable GL_FRAMEBUFFER_SRGB when needed and disable it afterwards.
This change should not affect existing users.

@szabolcsdombi
Copy link
Owner Author

blit from an srgb image to an srgb screen
image

@szabolcsdombi
Copy link
Owner Author

Moving this call to be enabled in the render command is expensive.
Also blit requires a more cumbersome logic to set this variable global parameter to the right value.

Having this flag enabled globally is indeed the right way to do it.

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

No branches or pull requests

1 participant