   No attributes or uniforms available in shader
  HiI am writing an OpenGL 3.2 game engine in C#, but OpenGL.glGetProgramiv() for   GL_ACTIVE_UNIFORMS and GL_ACTIVE_ATTRIBUTES returns 0. Even though both compiling and linking is successfull. I have been struggling with this for 2 days now :/This is the program source:public class Program{public bool Compile(){bool success = true; ;uint err = OpenGL.glGetError();foreach (var shader in shaders){if (!shader.Compile())success = false;OpenGL.glAttachShader(handle, shader.Handle);err = OpenGL.glGetError();if (err != OpenGL.Const.GL_NO_ERROR)success = false;}OpenGL.glLinkProgram(handle);var status = new int[1];OpenGL.glGetProgramiv(handle, OpenGL.Const.GL_LINK_STATUS, status);if (status[0] == 0)return false;elsereturn success;}}public abstract class Shader{internal bool Compile(){if (!is_compiled){OpenGL.glCompileShader(handle);var status = new int[1];OpenGL.glGetShaderiv(handle, OpenGL.Const.GL_COMPILE_STATUS, status);is_compiled = true;return status[0] != 0;}else{var status = new int[1];OpenGL.glGetShaderiv(handle, OpenGL.Const.GL_COMPILE_STATUS, status);return status[0] != 0;}}}This is the shader sources:<?xml version="1.0" encoding="UTF-8"?><material><VertexShader>#version 140uniform mat4 projection_mat;uniform mat4 modelview_mat;in vec3 in_position;in vec2 in_texcoord;in vec3 in_normal;out vec4 position;out vec3 normal;void main(){position = vec4(in_position, 1) * modelview_mat * projection_mat;} </VertexShader><FragmentShader>#version 140in vec4 position;in vec3 normal;out vec4 out_frag;void main(){out_frag = vec4(normal, 1);}</FragmentShader></material>I am very sure that OpenGL gets the shader source correctly, as intentionally adding errors will show up in the info log.out_frag is set as the fragment data using glBindFragDataLocationEXT.   
  Based on the shader I would suspect they have been optimised out.For example, you never write to 'normal' so the compiler can remove it, which means when you hit the fragment shader nothing is being written out.Same thing with position; you write to it but it never appears to get used again which means once again the compiler is free to remove it, and by extension the references to the two matrices.   ;  Ah! You are correct! Thank you very much.It would be nice if glValidateShader actually hinted to this, but no matter.Again: thanks!   