I have run my gl program successfully on my ubuntu system with a good graphics card. However, when I run it in an old intel machine with graphics mobile 4-series, I get thes
Run the feature deprecation list on page 2 of the GLSL 1.30 spec backwards:
#version 130
-> #version 120
in
-> attribute
out
-> varying
fragColor
declaration, replace fragColor
usage with gl_FragColor
Vertex shader:
#version 120
uniform mat4 mvpMatrix;
attribute vec4 vertex;
attribute vec2 textureCoordinate;
varying vec2 varyingTextureCoordinate;
void main(void)
{
varyingTextureCoordinate = textureCoordinate;
gl_Position = mvpMatrix * vertex;
}
Fragment shader:
#version 120
uniform sampler2D texture;
varying vec2 varyingTextureCoordinate;
void main(void)
{
gl_FragColor = texture2D(texture, varyingTextureCoordinate);
}