不支持GLSL 1.30 [英] GLSL 1.30 is not supported
本文介绍了不支持GLSL 1.30的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用良好的显卡在ubuntu系统上成功运行了gl程序.但是,当我在带有图形移动4系列的老式英特尔计算机上运行它时,会出现以下错误:
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 these errors:
QGLShader::compile(Vertex): 0:1(10): error: GLSL 1.30 is not supported. Supported version are: 1.10, 1.20 and 1.00 ES
QGLShader::compile(Fragment): 0:1(10): error: GLSL 1.30 is not supported. Supported version are: 1.10, 1.20 and 1.00 ES
我认为顶点和片段着色器文件中的某些关键字应更改为旧版本.有人可以建议我使用旧关键字吗?
I think some keywords in my vertex and fragment shader files should be changed to old version. Could any one suggest me the old keywords.
顶点着色器文件:
#version 130
uniform mat4 mvpMatrix;
in vec4 vertex;
in vec2 textureCoordinate;
out vec2 varyingTextureCoordinate;
void main(void)
{
varyingTextureCoordinate = textureCoordinate;
gl_Position = mvpMatrix * vertex;
}
片段着色器文件:
#version 130
uniform sampler2D texture;
in vec2 varyingTextureCoordinate;
out vec4 fragColor;
void main(void)
{
fragColor = texture2D(texture, varyingTextureCoordinate);
}
推荐答案
查看全文