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

With GLSL #version > 410 are not used the "*_glsl_410_core" shaders, but older ones #2329

Closed
BrutPitt opened this issue Feb 1, 2019 · 3 comments

Comments

@BrutPitt
Copy link

BrutPitt commented Feb 1, 2019

Hi @ocornut

Using ImGui_ImplOpenGL3_Init("#version 450");, I noticed that ImGui use and add the string #version 450 to the defaults *_shader_glsl_130 shaders , while I would expect it to use *_shader_glsl_410_core shaders.

It's not really a problem, it works anyway and the shaders are formally identical, but from source:

else if (glsl_version == 410)
{
vertex_shader = vertex_shader_glsl_410_core;
fragment_shader = fragment_shader_glsl_410_core;
}

would be enough just to change:

else if (glsl_version >= 410) 
 { 
     vertex_shader = vertex_shader_glsl_410_core; 
     fragment_shader = fragment_shader_glsl_410_core; 
}

or is there a particular reason why it is?

Thanks

@ocornut
Copy link
Owner

ocornut commented Feb 1, 2019

No reason afaik. If you confirm that it works i’ll make the change!

@ocornut
Copy link
Owner

ocornut commented Feb 1, 2019

Applied the patch now!

@ocornut ocornut closed this as completed Feb 1, 2019
ocornut added a commit that referenced this issue Feb 1, 2019
@BrutPitt
Copy link
Author

BrutPitt commented Feb 1, 2019

Yes, I confirm: it works.
I tested and used it for a couple of days before to open an "issue".

Thanks.

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

No branches or pull requests

2 participants