Okay, here''s the deal. I have a square in the middle of the screen, and a mesh circling around it. when the mesh gets behind the quad, i want another mesh to be drawn instead (i know it sounds strange, but i''ll post a completed demo and you will be amazed at how cool it looks with the rest of the effects). anyway, i figured it would go like this:
draw the initial mesh.
draw the quad
stencil in the outline of the quad
draw the second mesh, but only when the depth test fails. only draw in the stenciled area.
i''ve been hacking away at this for god knows how many hours and still it refuses to work. any suggestions welcome, and please, PLEASE, with some source code .