anchor.diff:    glPopAttrib;
   end;
   
  +
   function ReadClick(X, Y: word): Vector3f;
   var viewport:TVector4i;
       projection:TMatrix4d;
  
positive.code:   glvertex2f(Bx,By);
    glvertex2f(Ax,By);
  end;
  
  {Lines are drawn between pixels, thus when AA turned on they get blurred.
  We can negate this by using 0.5 offset
  
negative.code:   glReadPixels(vx, vy, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, @vz);
  
    if vz=1 then begin
      Result.x:=1000000; //Something out of working range
      Result.y:=0;
      Result.z:=0;
    end else begin
      //This function uses OpenGL parameters, not dglOpenGL
      gluUnProject(vx, vy, vz, modelview, projection, viewport, @wx, @wy, @wz);
      Result.x:=wx;
      Result.y:=wy;
      Result.z:=wz;
    end;
  end;
  
  
  procedure glkScale(x:single);
  begin
    glScalef(x,x,x);
  end;
  
  
  procedure glkQuad(Ax,Ay,Bx,By,Cx,Cy,Dx,Dy:single);
  begin
  