title: Switching from 3D to 2D in OpenGL
body: <p>I'm making a weather simulation in Opengl 4.0 and am trying to create the sky by creating a fullscreen quad in the background. I'm trying to do that by having the vertex shader generate four vertexes and then drawing a triangle strip. Everything compiles just fine and I can see all the other objects I've made before, but the sky is nowhere to be seen. What am I doing wrong?</p>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>GLint stage = glGetUniformLocation(myShader.Program, "stage");
  //...
  glBindVertexArray(FS); //has four coordinates (-1,-1,1) to (1,1,1) in buffer object
  glUniform1i(stage, 1);
  glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
  glBindVertexArray(0);
  </code></pre>
  
  <p><strong>vertex shader</strong></p>
  
  <pre><code>uniform int stage;
  void main()
  {
      if (stage==1)
      {
          gl_Position = vec4(position, 1.0f);
      }
      else
      {
          //...
      }    
  }
  </code></pre>
  
  <p><strong>fragment shader</strong></p>
  
  <pre><code>uniform int stage;
  void main()
  {
      if (stage==1)
      { //placeholder gray colour so I can see the sky
          color = vec4(0.5f, 0.5f, 0.5f, 1.0f);
      }
      else
      {
          //...
      }
  }
  </code></pre>
  
  <p>I should also mention that I'm a beginner in OpenGL and that it really <strong>has to</strong> be in OpenGL 4.0 or later.</p>
  
  <p><strong>EDIT:</strong>
  I've figured out where's the problem, but still don't know how to fix it. The square exists, but only displays if I multiply it with the view and projection matrix (but then it doesn't stay glued to the screen and just rotates along with the rest of the scene, which I do not want). Essentially, I somehow need to switch back to 2D or to screen space or however it's called, draw the square, and switch back to 3D so that all the other objects work fine. How?</p>