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);


There is never an N-gon in any model for a game. All graphics cards use triangles. N-gons are a software construct in 3D apps. When you model for games you should always use triangles or get rid of n-gons. I use Cinema4d and it has some good tools for that. Blender does also. If you do not triangulate your model, the end-user game engine or importer will ...

Top 50 recent answers are included