Today I encountered this problem:
I was developing a small engine running on a combination of SDL/OpenGL combo and wanted to try it at school PC (becauseOpenGL, and I want to use that engine for 1a school project), so I needed to test it on a school PC to see the performance. Problem was, that there wasThis resulted in a shader compile error in shader. Screen:

Shader compile ERROR
DEBUG INFO: ERROR: 0:12: 'texture' : no matching overloaded function found (using implicit conversion)
ERROR 0:12: '=' : cannot convert from 'const float' to '4-component vector of float'
Failed to load uniform
MyThis is my fragment shader(where, where the error occured):
#version 130
in vec4 fragmentColor;
in vec2 fragmentUV;
out vec4 color;
uniform float time;
uniform sampler2D mySampler;
void main(){
vec4 textureColor = texture(mySampler, fragmentUV);
color = textureColor * fragmentColor;
}
I solved it by using the texture2Dtexture2D function, instead of texturetexture. However use of this old version of, the older function is not recommended in newnewer code. So my question(actuallyThis leaves me with two questions) is:
WasWhy did this happen? Could it had been because of oldolder drivers being installed on these PC ? Or why it happenedPCs?
What should I do when I want to follow the new trendsguidelines, and also to make it "runnable"runnable on older machines? I thought about using two different shader,s and letting the program decide on the version, but I´m not sure.
At first I thought about using 2 different shaders and let the program decide about the version, but I´m not sure.