Closed melix99 closed 4 years ago
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?
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!
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.
Fixed in mosra/magnum@e6dc5be1af95d6df7ec542624483304bfbef0d4a -- 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.
This only happens using glfw and using macOS (doesn't happen on Linux, untested on Windows).