I'm on a Mac, using Swift, and using OpenGL 3.2. I'm also using XCode 6.1 Beta so I suppose that's the most likely explanation, because it doesn't seem to me like this makes sense.
I can't find any evidence that this shouldn't be supported, but this fragment shader is resulting in the error Invalid call of undeclared identifier 'texture2D'
during compilation:
#version 150
uniform sampler2D usTexture;
in vec2 vTextureCoord;
out vec4 FragColor;
void main() {
vec4 color = texture2D(usTexture, vTextureCoord);
FragColor = color;
}
Cripes. Finally found the answer right after I posted the question. texture2D
has been replaced by texture
.