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

egui_glow: Only disable sRGB framebuffer on supported platforms #3994

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

Nopey
Copy link
Contributor

@Nopey Nopey commented Feb 7, 2024

This solves a GL_INVALID_ENUM error common on Windows (occurs on my Windows 10 machine with a GTX 1070 Ti).

ARB_framebuffer_SRGB is entirely unsupported on WebGL, hence why latest egui (master branch) doesn't try to disable SRGB framebuffers on wasm32 and this PR's code doesn't even check for ARB_framebuffer_sRGB on wasm32.

@emilk emilk changed the title egui_glow: Don't disable SRGB framebuffer when unsupported egui_glow: Only disable sRGB framebuffer on supported platforms Feb 7, 2024
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

crates/egui_glow/src/painter.rs Outdated Show resolved Hide resolved
crates/egui_glow/src/painter.rs Outdated Show resolved Hide resolved
@emilk emilk added the egui_glow Relates to running egui_glow on native label Feb 7, 2024
This solves a GL_INVALID_ENUM error common on Windows, see
servo/servo#30782.
@emilk emilk merged commit 21f08af into emilk:master Feb 8, 2024
19 checks passed
emilk pushed a commit that referenced this pull request Feb 10, 2024
This solves a GL_INVALID_ENUM error common on Windows (occurs on my
Windows 10 machine with a GTX 1070 Ti).

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

ARB_framebuffer_SRGB is entirely unsupported on WebGL, hence why latest
egui (master branch) doesn't try to disable SRGB framebuffers on wasm32
and this PR's code doesn't even check for ARB_framebuffer_sRGB on
wasm32.

*  For <servo/servo#30782>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui_glow Relates to running egui_glow on native
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants