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 imgui_impl_opengl3 on MacOS #3199

Closed
wants to merge 2 commits into from
Closed

Conversation

albertvaka
Copy link
Contributor

GLSL version '130' is not supported on MacOS.

Output without this patch:

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile vertex shader!
ERROR: 0:1: '' :  version '130' is not supported
ERROR: 0:2: '' :  #version required and missing.

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile fragment shader!
ERROR: 0:1: '' :  version '130' is not supported
ERROR: 0:2: '' :  #version required and missing.

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link shader program! (with GLSL '#version 130
')
ERROR: One or more attached shaders not successfully compiled

GLSL version '130' is not supported on MacOS.
@ocornut
Copy link
Owner

ocornut commented May 5, 2020

Hello,

Which example application are your compiling this with?

All the examples/example_glfw_opengl3/main.cpp and other equivalent examples running on OSX are running this backend with GLSL #version 150 so if anything I believe this is what we should default to.

Could you test that in your setup?
It may also depend on your GL context version, what it is? And what is your xcode version and OS version?

@albertvaka
Copy link
Contributor Author

It does work with 150, I've updated the patch.

I'm on MacOS 10.14 (Mojave), but it shouldn't change much across versions since Apple hasn't updated their OpenGL in ages. I tested this on a OpenGL 3.2 context.

ocornut pushed a commit that referenced this pull request May 8, 2020
@ocornut
Copy link
Owner

ocornut commented May 8, 2020

Merged now, thank you @albertvaka !

@ocornut ocornut closed this May 8, 2020
vaiorabbit pushed a commit to vaiorabbit/ruby-imgui that referenced this pull request May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants