title: selective depth testing possibility in openGL
body: <p>Is there a way to enable depth testing only for the triangles belonging to sphere and leave the original depth buffer untouched and see only triangles of sphere facing camera ?</p>
  
  <pre><code>glEnable(GL_CULL_FACE);
  glCullFace(GL_BACK);
  glFrontFace(GL_CCW);
  glDepthMask(false);
  </code></pre>
  
  <p>// rendering a primitive here (cone or sphere)</p>
  
  <pre><code>glDepthMask(true);
  </code></pre>
  
  <p>It looks like i can still see back faces of primitive.<img src="https://i.stack.imgur.com/pGfWu.png" alt="cone rendering"></p>