使用SDK的opengles的API glCompileShader()对下面的着色器代码进行编译可以通过
“ "#version 300 es \n"
"uniform mat4 rotation;\n"
"layout(location = 0) in vec4 a_position;\n"
"layout(location = 1) in vec2 a_texCoord;\n"
"out vec2 v_texCoord;\n"
"void main() {\n"
" gl_Position = a_position;\n"
" v_texCoord = a_texCoord;\n"
"}\n";
而对下面的代码编译时报错
”
“#version 440 core
#ifdef GL_ES
precision mediump float;
#endif
in vec2 TexCoord;
layout(binding = 0) uniform sampler2D Ytex;
layout(binding = 1) uniform sampler2D UVtex;
out vec4 FragColor;
lowp vec3 rgb;
。。。。
”
系统报错“ERROR: 0:1: Syntax error, version 440 not supported”
请问怎么解决这个错误?