I need to create a completely transparent surface passing through the origin of the axes and always parallel to the screen.
I'm trying to use this code (in c++) but the result is something like 50% blend (not completely):
glPushMatrix();
glLoadIdentity();
glBlendFunc(1, 1);
glBegin(GL_QUADS);
glVertex3f(-100, -100, -0.003814);
glVertex3f(100, -100, -0.003814);
glVertex3f(100, 100, -0.003814);
glVertex3f(-100, 100, -0.003814);
glEnd();
glPopMatrix();
Additional informations: I need this transparent surface to get a point on it with the function gluUnProject(winX, winY, winZ, model, proj, view, &ox, &oy, &oz);
If you just want to fill the depth buffer you can disable color writes via
glColorMask():