title: In graphics applications, why do shaders get loaded into the application on runtime?
body: <p>Shaders written in for example GLSL are typically loaded into a graphics application at runtime. I am wondering why not just compile the application with the shaders so they will not have to be loaded later. Like this:</p>
  
  <pre><code>#define glsl(version, glsl) "#version " #version "\n" #glsl
  
  namespace glsl { namespace vs {
  //VERTEX SHADERS
  //=========================
  // simple VS
  //=========================
  constexpr GLchar * const simple = glsl(450 core, 
      layout(location = 0) in vec3 position;
  
      void main() {
          gl_Position = vec4(position, 1.0f);
      }
      );
  
  } namespace fs {
  //FRAGMENT SHADERS
  //=========================
  // simple FS
  //=========================
  constexpr GLchar * const simple = glsl(450 core,
      out vec4 color;
  
      void main() {
          color = vec4(1.0f, 0.0f, 0.0f, 1.0f);
      }       
      );
  
  } }
  </code></pre>
  
  <p>I don't think this would result in too large of an exe file and it would speed up loading times; unless I'm mistaken about how many shaders are used for a typical graphics application. I realize you may want to update shaders after compile time, but does that really happen?</p>
  
  <p><strong>Is there any reason that I should not want to do this?</strong></p>