   Another alpha problem
  Hi,I am currently making a project with OpenGL in C# that needs to have transparent models. The problem is we see all transparent triangles behind the opaque triangles. How can I fix that? I mixed NeHe's tutorial with another one to do this.This is a part of my code:''void Quad(double a)   {GL.glEnable(GL.GL_TEXTURE_2D);  GL.glEnable(GL.GL_ALPHA);  GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);if (a != 1)  { GL.glEnable(GL.GL_BLEND); GL.glDisable(GL.GL_DEPTH_TEST);}  else  { GL.glDisable(GL.GL_BLEND);// Turn Blending Off GL.glEnable(GL.GL_DEPTH_TEST);// Turn Depth Testing On  }GL.glBegin(GL.GL_QUADS);  GL.glColor4d(1, 0, 0, a); GL.glTexCoord2d(0, 0); FaceBotLeft(); // draw the vertex  GL.glColor4d(0, 1, 0, a); GL.glTexCoord2d(0, 1); FaceTopLeft();  GL.glColor4d(0, 1, 1, a); GL.glTexCoord2d(1, 1); FaceTopRight();  GL.glColor4d(1, 0, 1, a); GL.glTexCoord2d(1, 0); FaceBotRight();GL.glEnd();}"   
  You're disabling the depth test... this is the feature that tells a pixel not to draw itself it it's behind an already drawn pixel.   