SasMaster
09-07-2011, 10:56 PM
Hi All .I run into the following problem.I load my shaders from files.The shader program ,when trying to compile, throws these errors for the vertex and fragment shaders:
Vertex info
-----------
0(12) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
Fragment info
-------------
0(10) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
When inspecting the loaded content of the files I can see all kinds of garbage text is attached at the beginnings and the ends of the shader files.Like this one:
#version 330
layout (location = 0) in vec4 position;
layout (location = 1) in vec4 color;
smooth out vec4 theColor;
void main()
{
gl_Position = position;
theColor = color;
}¤¤¤¤лллллллл■ю■ю■ю■
I tried to change the encoding from UTF-8 top ANSI ,also tried to edit outside the visual studio but the problem still persists .Any help on this will be greatly appreciated.
Vertex info
-----------
0(12) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
Fragment info
-------------
0(10) : error C0000: syntax error, unexpected $undefined at token "<undefined>"
When inspecting the loaded content of the files I can see all kinds of garbage text is attached at the beginnings and the ends of the shader files.Like this one:
#version 330
layout (location = 0) in vec4 position;
layout (location = 1) in vec4 color;
smooth out vec4 theColor;
void main()
{
gl_Position = position;
theColor = color;
}¤¤¤¤лллллллл■ю■ю■ю■
I tried to change the encoding from UTF-8 top ANSI ,also tried to edit outside the visual studio but the problem still persists .Any help on this will be greatly appreciated.