Original Post
Hi there , I just started with GLSL and I'm trying to write a very simple fragment shader , which copies the contents of one texture into another(which is attached to the framebuffer). Here's the shader code: uniform sampler2D sampler1; varying vec2 Texcoord; varying vec3 PixelData; void main(){ vec3 PixelData = texture2D(sampler1,TexCoord).rgb; gl_FragColor = vec4(PixelData, 1.0); } However when I try to run my application the following Infolog appears: InfoLog: (1) : error C1008: undefined variable "TexCoord" (1) : error C1102: incompatible type for parameter #2 ("c") (1) : error C1008: undefined variable "TexCoord" (1) : error C1102: incompatible type for parameter #2 ("c") (1) : error C1008: undefined variable "TexCoord" (1) : error C1102: incompatible type for parameter #2 ("c") From all the shader code examples I've read so far I cannot se something wrong with my code. Am I missing something? Thanx in advance :)