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

imgui-integration: ColorPicker gradient appears jagged on macOS using glfw #59

Closed
melix99 opened this issue Dec 18, 2019 · 4 comments
Closed

Comments

@melix99
Copy link
Contributor

melix99 commented Dec 18, 2019

This only happens using glfw and using macOS (doesn't happen on Linux, untested on Windows).

image

@mosra mosra added this to the 2019.1c milestone Dec 18, 2019
@mosra
Copy link
Owner

mosra commented Dec 18, 2019

Huh. So, in other words, if you use SDL, it doesn't happen on macOS? Might it be that GLFW defaults to a 16-bit framebuffer for some reason and SDL doesn't. That's probably the reason why this happens -- the hue bar seems to have color banding as well, though it's not as noticeable.

Can you try configuring setColorBufferSize() to {8, 8, 8, 8} instead of the default?

@melix99
Copy link
Contributor Author

melix99 commented Dec 18, 2019

So, in other words, if you use SDL, it doesn't happen on macOS?

Yep, exactly.

Can you try configuring setColorBufferSize() to {8, 8, 8, 8} instead of the default?

Yay, that fixed the problem!

@mosra
Copy link
Owner

mosra commented Dec 18, 2019

Hmm. Then I think it might be reasonable to make that a default everywhere ... but not sure about perf implications on slower platforms, such as the web. For the record, neither Metal nor D3D supports 24-bit framebuffer formats, so {8, 8, 8, 0} probably picks some RGBX anyway.

I'll give this some thought and if I don't come up with any better solution, I'll make the change.

@mosra
Copy link
Owner

mosra commented Apr 9, 2020

Fixed in mosra/magnum@e6dc5be -- I didn't come up with anything better, so all apps now default to a 32-bit RGBA framebuffer. If this causes some platforms to be suddenly slower, people can always override this, and I believe it's better to be correct by default than fast but incorrect by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants