0
我使用的着色器,其在另一個程序中工作(在相同的環境據我所知),其現在不能編譯某些原因:錯誤C1105:不能調用非功能
// Vertex Shader
#version 330 core
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 1) in vec2 vertexUV;
out vec2 fragmentUV;
uniform mat4 ortho_matrix;
void main()
{
gl_Position = ortho_matrix * vec4(vertexPosition_modelspace, 1);
fragmentUV = vertexUV;
}
// Fragment Shader
#version 330 core
in vec2 fragmentUV;
uniform sampler2D texture;
out vec4 color;
void main()
{
color.rgba = texture(texture, fragmentUV).rgba;
}
這是一個超級基本着色器現在它開始突然拋出錯誤。
的Windows 8.1 的Nvidia GeForce 1080(這個是新的,也許這就是問題所在?)
這是什麼由Visual Studio爲輸出:
現在我想起它很明顯,但我仍然是GLSL的新手。謝謝,我會盡我所能檢查你的答案。 –