title: Why is openGL glDepthFunc() not working?
body: <p>im playing with openGL and im trying to get rid of blue marked triangles. I use for it this code: </p>
  
  <pre><code>glEnable(GL_DEPTH_TEST);
  glDepthFunc(GL_LESS);
  glEnable(GL_CULL_FACE);
  </code></pre>
  
  <p>And yes I use </p>
  
  <pre><code>glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
  </code></pre>
  
  <p>in my main loop. I've read the problem can be projection matrix. I use these values:</p>
  
  <pre><code>ProjectionMatrix = glm::perspective(45.5f, 4.0f / 3.0f, 0.1f, 100.0f);
  </code></pre>
  
  <p>I was trying to change the near and far value but its still the same. I was also trying change parameter of glDepthFunc but it also didnt help me.
  So, any ideas?? Thanks a lot</p>
  
  <p><img src="https://i.stack.imgur.com/jfHJj.png" alt="my result"></p>