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

Fix error 1280 in MacOS when querying GL_FRAMEBUFFER_SRGB_CAPABLE_EXT #1749

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

riccardobl
Copy link
Member

The line getBoolean(GLExt.GL_FRAMEBUFFER_SRGB_CAPABLE_EXT) in GLRenderer throw an opengl error 1280 (invalid enum) when the GL debugger is enabled.
I am not sure why this is the case, however i believe it is safe to assume that every modern macos device is sRGB capable.

@riccardobl riccardobl changed the title Always assume modern MacOS to be sRGB capable. Fix error 1280 in MacOS when querying GL_FRAMEBUFFER_SRGB_CAPABLE_EXT Jan 17, 2022
@riccardobl riccardobl force-pushed the srgbmac branch 2 times, most recently from 4551bdd to f27b663 Compare January 18, 2022 10:39
@riccardobl
Copy link
Member Author

I reconsidered this PR, it just removes a warning, so it is better to exclude all the mac os platforms, worst case scenario: the devs won't receive a warning when using sRGB on unsupported deprecated platforms, not a big deal.

There isn't a way to get the generic os name (ie without the arch) from Platform in jme, so i've added that aswell, it will be useful to apply os specific workarounds across the engine.

@stephengold
Copy link
Member

Another way to determine the OS is to invoke org.lwjgl.system.Platform. I'm unsure which is better in the long run.

@stephengold stephengold added the defect Something that is supposed to work, but doesn't. Less severe than a "bug" label Jan 18, 2022
@stephengold stephengold added this to the v3.5.0 milestone Jan 18, 2022
@riccardobl
Copy link
Member Author

We can't use org.lwjgl.system.Platform outside of the jme3-lwjgl3 modules

@stephengold
Copy link
Member

Regarding "Platform.java", I have some style requests:

  • Please provide javadoc for the new public class and the new public method.
  • Please provide a space character after each new comma, before each new curly brace, and on both sides of each assignment operator.

@riccardobl
Copy link
Member Author

done

@stephengold
Copy link
Member

Ready for integration, I think.

@riccardobl riccardobl merged commit befe4fa into jMonkeyEngine:master Jan 18, 2022
@stephengold
Copy link
Member

Thanks, Riccardo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something that is supposed to work, but doesn't. Less severe than a "bug"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants