New answers tagged


In glsl, the texture function returns a vec4, thus you provide too much arguments to the vec4. It should be color = texture(sampler, texCoord); To avoid issues like this, always print out what glGetError returns. Second problem: Guess what GL.ShaderSource takes in as arguments. A shader, and you provided a shader program to it.


Line 5 and 6 of LoadShaderProgram() contain a copy/paste error. GL.ShaderSource(program, VSSource); GL.ShaderSource(program, FSSource); Should be instead: GL.ShaderSource(vshader, VSSource); GL.ShaderSource(fashader, FSSource);

Top 50 recent answers are included