Failing vertex and fragment shaders


#1

After spending some time getting imgui correctly intergrated, I am now running into shader failure. My console window returns these log messages:

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile vertex shader!
0(5) : error C5060: out can’t be used with non-varying Frag_UV
0(6) : error C5060: out can’t be used with non-varying Frag_Color

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile fragment shader!
0(4) : error C5060: out can’t be used with non-varying Out_Color
0(7) : error C7532: global function texture requires “#version 130” or later

ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link shader program!
Vertex info

0(5) : error C5060: out can’t be used with non-varying Frag_UV
0(6) : error C5060: out can’t be used with non-varying Frag_Color
(0) : error C2003: incompatible options for link

Fragment info

0(4) : error C5060: out can’t be used with non-varying Out_Color
0(7) : error C7532: global function texture requires “#version 130” or later
(0) : error C2003: incompatible options for link

I’ve been digging through the code and can’t seem to find what is going on. Any help would be awesome!

I am using the example impl_opengl3 of version 1.63 i’m pretty sure.


#2

Does it happen if you compile the provided example as is or in your own code base?

You need to make sure your OpenGL Context Version and GLSL version are aligned. You can select the GLSL version when calling the _Init function.